(function(){var kt,f,it,ht,wr,ci,yi,rt,n,br,wi,u;try{(function(){var n={L_microsoftcopyright_text:"© {year} Microsoft Corporation",L_DistanceUnitKm_Text:"km",L_DistanceUnitMeters_Text:"m",L_DistanceUnitMilesShortText_Text:"mi",L_DistanceUnitMilesLongText_Text:"miles",L_DistanceUnitFeetShort_Text:"ft",L_Distance_Format:"{0} {1}",L_LatLon_Format:"{0}, {1}",L_Duration:"{0} hr {1} min",L_Duration_NoMin:"{0} hr",L_Duration_Min:"{0} min",L_DistanceUnitFeetSquareShort_Text:"sq ft",L_DistanceUnitKmSquare_Text:"sq km",L_DistanceUnitMetersSquare_Text:"sq m",L_DistanceUnitMilesSquareShortText_Text:"sq mi",L_AreaFieldString:"Area",L_FormatFieldString:"{0}: {1}",L_IncorrectValue_text:"N/A",L_LengthFieldString:"Length",L_FocusDivDefaultLabel:"Bing Maps – Interact to see more"};window.$MicrosoftMaps8.ResourceManager?window.$MicrosoftMaps8.ResourceManager.init("MapCore",n):window.$MicrosoftMaps8.ResourcesObject=n})();n=function(){function n(n){Array.prototype.push.apply(this,n)}function t(i,r){if(i&&i instanceof n)return i;var u=!i&&[]||(r||typeof i=="string")&&t.query(i,r)||i instanceof Array&&i||[i];return new n(u)}function i(n,t){for(var i in t)t.hasOwnProperty(i)&&(n.prototype[i]=t[i])}return i(n,{length:Array.prototype.length,entities:function(){return Array.prototype.slice.apply(this)},sort:function(n){return Array.prototype.sort.call(this,n),this},reverse:function(){return Array.prototype.reverse.call(this),this},push:function(){return Array.prototype.push.apply(this,arguments),this},pop:function(){var t=Array.prototype.pop.call(this);return new n([t])},shift:function(){var t=Array.prototype.shift.call(this);return new n([t])},unshift:function(){return Array.prototype.unshift.apply(this,arguments),this},slice:function(){return new n(Array.prototype.slice.apply(this,arguments))},splice:function(){return new n(Array.prototype.splice.apply(this,arguments))},concat:function(t){return new n(Array.prototype.concat.apply(this.entities(),t.entities&&t.entities()||arguments))}}),t.Helper={get_guid:function(){var n=0;return function(t){if(!t)return"";if(t===window)return"win";if(t===document)return"doc";if(t.uniqueID)return t.uniqueID;var i="__$gimme$_guid__";return typeof t[i]=="undefined"&&(t[i]=i+n++),t[i]}}()},t.Browser=function(){var n=navigator.userAgent.toLowerCase(),t=-1,i;navigator.appName==="Microsoft Internet Explorer"&&(n=navigator.userAgent,i=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"),i.exec(n)!==null&&(t=parseFloat(RegExp.$1)));var r=typeof ActiveXObject!="undefined"||typeof MSPointerEvent!="undefined",o=new RegExp("\\s+Edge/([0-9]+).[0-9]+"),u=o.exec(navigator.userAgent)!==null,f=n.indexOf("chrome")>-1&&!u,s=!f&&n.indexOf("safari")>-1,e=!1;try{e=document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp")===0}catch(h){}return{is_ie:r,is_edge:u,is_opera:typeof opera!="undefined",is_chrome:f,is_khtml:n.indexOf("khtml")!==-1,is_gecko:n.indexOf("khtml")===-1&&n.indexOf("gecko")!==-1&&!r,is_in_quirks_mode:document.compatMode==="BackCompat",ie_version:t,is_webkit:n.indexOf("applewebkit/")!==-1,is_safari:s,is_WebpSupported:e}}(),t.undefined={}._$gimme$_undefined,t.ext=n.prototype,t}();n.ext.select=function(t){return n(t,this[0])};typeof g=="undefined"&&(window.g=n);n.Internals=new function(){function n(n){return function(t,i,r){this[n](t,i,r)}}return{addEventListener:n("addEventListener"),removeEventListener:n("removeEventListener"),attachEvent:n("attachEvent"),detachEvent:n("detachEvent")}};n.query=function(){return function(){function k(n,t,i){return r[t](n,i)}function d(n,t){var r=[],u=t.length,i;do i=h(n,t[--u]||t),i&&r.push(i);while(u);return r}function h(n,t){if(n===document||!t)return t;for(var i=t;(i=i.parentNode)&&i!==n;);return i===n&&t||null}function g(n,t){var i=n.document||document;return h(n,i.getElementById(t))}function c(n,t){var i,f,r,e;if(t=t||document,n.id)return a([g(t,n.id)],n);if(delete n.id,i=t.getElementsByTagName(n.tag||"*"),(!n.classes||n.classes.length<1)&&(!n.attributes||n.attributes.length<1)&&(!n.pseudos||n.pseudos.length<1))return l(i);for(f=[],e=i.length,r=0;r1?u.concat(r):r}}return u}var t,i,n,r,o,s,v=function(){function n(n,t){return n.indexOf(t)}function t(n,t){for(var r=n.length,i=0;i=0&&f%(i.param.a||1)==0}return!1},contains:function(n,t){return(n.textContent||n.innerText||n.innerHTML).indexOf(t.param.wholeValue)!==-1},not:function(){return!1}};return function(n,r){for(var u=r.length,f;u--;)if(f=i[r[u]]||t.parse(r[u]),!t[f.name](n,f))return!1;return!0}}()," ":function(n,t){for(var r=[],f=n.length,u,i=0;i":function(n,t){for(var r=[],u=n.length,i=0;i+~,])\s*/g,"$1")},reset:function(){r=[];t=[];n=new i},finish:function(){return n&&n.propNames.length>0&&t.push(n),t.length>0&&r.push(t),r},"default":function(t){var r=t.match(/(\w+|\*)/),i;return r?(i=r[0].toUpperCase(),n.storePropertyValue("tag",i),i.length):null},"#":function(t){var i=t.match(/#([_\-\w]+)/),r;return i?(r=i[1],n.storePropertyValue("id",r),i[0].length):null},".":function(t){var i=t.match(/\.([_\-\w\d]+)/),r;if(i)return r=i[1],n.storeArrayValue("classes",r),i[0].length},"[":function(t){var r=t.match(/(\[.*"\]|.*?\])/),i;return r?(i=r[0],n.storeArrayValue("attributes",i),i.length):null},":":function(t){var r=t.match(/:[\w-_]+\b(\(.*\))?/),i;return r?(i=r[0],n.storeArrayValue("pseudos",i),i.length):null}," ":function(){return t.push(n," "),n=new i,1},">":function(){return n.propNames.length>0&&t.push(n),t.push(">"),n=new i,1},"~":function(){return t.push(n,"~"),n=new i,1},"+":function(){return t.push(n,"+"),n=new i,1},",":function(){return t.push(n),r.push(t),t=[],n=new i,1}}},s=new it(o),b.Internal={unique:p,index_of:v,contains:y,contains_class:w,has_class:r.classes,get_attr:f,get_class:nt,set_class:tt},b}()}();n.Helper.index_of=n.query.Internal.index_of;n.Helper.contains=n.query.Internal.contains;n.Helper.unique=n.query.Internal.unique;n.Helper.get_attr=n.query.Internal.get_attr;n.Helper.contains_class=n.query.Internal.contains_class;n.Helper.has_class=n.query.Internal.has_class;n.Helper.get_class=n.query.Internal.get_class;n.Helper.set_class=n.query.Internal.set_class;n.Effects={Animation:function(n){function s(n){for(var h=e(n),r=t.length,o,s;r--;){s={};for(o in u)s[o]=i[o][r]+u[o][r]*h;f(t[r],s,n)}}var t=n.elements||[],o=n.duration||1,i=n.from||{},r=n.to||{},u={},f,e;(function(){var f,n,s,e={},o={},h={};for(n in i)for(e[n]=[],o[n]=[],h[n]=[],f=t.length;f--;)s=t[f],e[n][f]=typeof i[n]=="function"?i[n](s,n):i[n],o[n][f]=typeof r[n]=="function"?r[n](s,n):r[n],h[n][f]=o[n][f]-e[n][f];i=e;r=o;u=h})();f=n.animate;e=n.easing||function(n){return n};this.startTime=n.startTime||0;this.duration=o;this.add_element=function(n){t.push(n)};this.remove_element=function(n){for(var i=t.length;i--;)if(t[i]===n){t.splice(i,1);break}};this.tick=s},Storyboard:function(t){function f(){e||(e=!0,s=Date.now(),o=n.Effects.Animation.requestAnimationFrame(v))}function p(){i=0;r=1;f()}function w(){c();a&&a(i)}function c(){n.Effects.Animation.cancelAnimationFrame(o);e=!1}function b(){f()}function k(){r=1;f()}function d(){r=-1;f()}function g(){r*=-1;f()}function nt(n){i=n;y()}function tt(){return i}function it(){return e}function rt(){return r}function ut(){return u}function ft(){return h}function v(){var t=Date.now();i+=(t-s)/h*r;s=t;i=i<0?0:i>1?1:i;y();r===-1&&i===0||r===1&&i===1?(c(),l&&l(i)):o=n.Effects.Animation.requestAnimationFrame(v)}function y(){for(var t=u.length,n;t--;)n=(h*i-u[t].startTime)/u[t].duration,n=r===-1&&n<0?0:r===1&&n>1?1:n,n>=0&&n<=1&&u[t].tick(n)}var o,s,i=0,r=1,e=!1,u=t.animations,h=t.duration||0,et=t.interval||1,l=t.completed,a=t.aborted;this.begin=p;this.abort=w;this.pause=c;this.resume=b;this.forward=k;this.backward=d;this.reverse=g;this.seek=nt;this.get_position=tt;this.is_running=it;this.get_direction=rt;this.get_animations=ut;this.get_duration=ft},Easing:{Back:new function(){function n(n,t,i,r){return t=.5,i=0,r=.5,Math.pow(1-n,i)*r*Math.sin(2*Math.PI*n*t)*-1+n}function t(){}function i(){}this.ease_in=n;this.ease_out=t;this.ease_in_out=i},Bounce:new function(){function t(n,t,i){return t=t||1.5,i=i||4,Math.abs(Math.pow(n,t)*Math.cos(Math.PI*n*i))}function i(t,i,r){return 1-n.Effects.Easing.Bounce.ease_in(1-t,i,r)}function r(t,i,r){var u=0,f=n.Effects.Easing.Bounce.ease_in;return t>.5&&(f=n.Effects.Easing.Bounce.ease_out,t-=.5,u=1/2),f(t,i,r)-u}this.ease_in=t;this.ease_out=i;this.ease_in_out=r},Elastic:new function(){function n(){}function t(n,t,i){return t=t||3.5,i=i||5,1-Math.pow(1-n,t)*Math.cos(2*Math.PI*n*i)}function i(){}this.ease_in=n;this.ease_out=t;this.ease_in_out=i},Exponential:new function(){function n(n,t){return Math.pow(n,t)}function t(n,t){return Math.pow(n,1/t)}function i(i,r){return i<=.5?n(i*2,r)*.5:t((i-.5)*2,r)*.5+.5}this.ease_in=n;this.ease_out=t;this.ease_in_out=i}},Enums:{Directions:{vertically:1,horizontally:2,both:3},Speeds:{quickly:500,slowly:1e3}},RunningAnimations:function(){var t={};return{add:function(n,i){t[n]=i},remove:function(n){delete t[n]},get:function(i){return t[i]||new n.Effects.Storyboard({animations:[]})},contains:function(n){return!!t[n]}}}()};n.Effects.Storyboard.create=function(t,i,r,u,f,e,o,s,h){f=Math.floor(f)||n.Effects.Enums.Speeds[f]||n.Effects.Enums.Speeds.quickly;var c=new n.Effects.Storyboard({duration:f,interval:h,completed:function(){o&&o.call(this);n.Effects.RunningAnimations.remove(e);c=null},aborted:function(){n.Effects.RunningAnimations.remove(e);c=null},animations:[new n.Effects.Animation({from:i,to:r,duration:f,animate:u,easing:s,elements:t})]});return e&&n.Effects.RunningAnimations.add(e,c),c},function(){var t=0,i={};n.Effects.Animation.requestAnimationFrame=function(){function u(n,t){return function(){try{i[t]&&n(Date.now());delete i[t]}catch(r){if(Microsoft.Maps.logger)Microsoft.Maps.logger.logCriticalError(r);else throw r;}}}function e(n,f){var e=i[++t]=u(n,t);return r(e,f),t}function o(n){var r=i[++t]=u(n,t);return Microsoft.Maps.setTimeout(r,f),t}var f=16,n=window,r=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame;return r?e:o}();n.Effects.Animation.cancelAnimationFrame=function(n){delete i[n]}}();n.Screen=new function(){function t(){return typeof innerWidth!="undefined"?{width:window.innerWidth,height:window.innerHeight}:typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!==0?{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}:{width:document.getElementsByTagName("body")[0].clientWidth,height:document.getElementsByTagName("body")[0].clientHeight}}function i(n){var t,i;return n=n||window.event,t={x:0,y:0},typeof n.pageX!="undefined"?(t.x=n.pageX,t.y=n.pageY):(i=this.get_scroll_pos(),t.x=n.clientX+i.x,t.y=n.clientY+i.y),t}function r(){return n(window).get_scroll_pos()}this.get_viewport_size=t;this.get_mouse_pos=i;this.get_scroll_pos=r};n.Util=new function(){function t(){return n(arguments,!1)}function i(){return n(arguments,!0)}function n(n,t){function u(){i.apply(this,Array.prototype.slice.call(n,2));t||(i=null)}var i=n[0],r=n[1];return t===!0?Microsoft.Maps.setInterval(u,r):Microsoft.Maps.setTimeout(u,r)}this.set_timeout=t;this.set_interval=i};n.Style=new function(){function o(i){var u=i.scrollTop&&i!==document.documentElement&&i!==document.body&&i.tagName!=="TEXTAREA"&&i.tagName!=="INPUT"?-1:0,r={x:i.scrollLeft*u,y:i.scrollTop*u},f;return n.Browser.is_ie&&t(i,"position")==="static"?(f=i.style.position,i.style.position="relative",r.x+=i.offsetLeft,r.y+=i.offsetTop,i.style.position=f):(r.x+=i.offsetLeft,r.y+=i.offsetTop),r}function l(u){var f={x:0,y:0},s;if(u.getBoundingClientRect){var e=u.getBoundingClientRect(),h=r(),c=n(window).get_scroll_pos();f.x=e.left-h.x+c.x;f.y=e.top-h.y+c.y;f.width=e.width;f.height=e.height}else while(u!==null)s=o(u),f.x+=s.x,f.y+=s.y,u=u.offsetParent,u&&!i()&&(f.x+=parseFloat(t(u,"borderLeftWidth"))||0,f.y+=parseFloat(t(u,"borderTopWidth"))||0);return f}function i(){var n,t;return typeof i.constantValue=="undefined"&&(n=document.createElement("div"),n.style.cssText="position:absolute;visibility:hidden;top:0;left:0;border:1px solid #000;",t=document.createElement("div"),n.appendChild(t),document.body.appendChild(n),i.constantValue=t.offsetTop===1,document.body.removeChild(n),n=t=null),i.constantValue}function r(){var i,u;if(typeof r.constantValue=="undefined"){var t=document.documentElement,f=t.style.position,e=t.style.margin,o=t.style.border;t.style.position="static";t.style.margin="0";t.style.border="1px solid transparent";i=t.getBoundingClientRect();u=n(window).get_scroll_pos();r.constantValue={x:i.left+u.x,y:i.top+u.y};t.style.position=f;t.style.margin=e;t.style.border=o;document.documentElement.className=document.documentElement.className}return r.constantValue}function t(n,t){var i="",r,e,f;return n.currentStyle&&(t==="right"||t==="bottom")?i=u(t,"auto","auto",n)+"px":(r=document.defaultView&&document.defaultView.getComputedStyle&&document.defaultView.getComputedStyle(n,null)||n.currentStyle,r&&(i=r[t]||"",e=i.match(/px$/),e||(f=i.match(/(em|ex|%|in|cm|mm|pt|pc|small|medium|large|thin|thick|auto)$/),f&&(i=u(t,i,f[0],n)+"px")))),i}function u(i,r,u,f){var s,h,a,o,c,v,y,p,l,e,w;if(r){if(u==="px")return parseFloat(r);if(r==="auto")switch(i){case"top":case"left":return 0;case"bottom":case"right":if(s={bottom:["top","offsetTop","height","offsetHeight"],right:["left","offsetLeft","width","offsetWidth"]},h=n(f),h.get_style("position")==="relative")return a=s[i][0],-parseInt(h.get_style(a));for(o=f.parentNode;o!==document&&n(o).get_style("position")==="static";)o=o.parentNode;return c=s[i][2],v=o===document?n.Screen.get_viewport_size()[c]:parseInt(n(o).get_style(c)),y=s[i][1],p=s[i][3],v-f[y]-f[p];case"height":return f.clientHeight||f.offsetHeight&&f.offsetHeight-parseFloat(t(f,"borderTopWidth"))-parseFloat(t(f,"borderBottomWidth"))||0;case"width":return f.clientWidth||f.offsetWidth&&f.offsetWidth-parseFloat(t(f,"borderLeftWidth"))-parseFloat(t(f,"borderRightWidth"))||0;default:return 0}else{switch(i){case"borderLeftWidth":case"borderRightWidth":case"borderTopWidth":case"borderBottomWidth":return i=i.replace("Width","Style"),l=t(f,i),l==="none"?0:parseFloat(l)}f=f||document.body;e=document.createElement("div");e.style.visbility="hidden";e.style.position="absolute";e.style.lineHeight="0";u==="%"?(f=f.parentNode,i==="height"||i==="top"?e.style.height=r:(i==="width"||i==="left")&&(e.style.width=r)):(e.style.borderStyle="solid",e.style.borderBottomWidth="0",e.style.borderTopWidth=r);try{f.appendChild(e)}catch(b){f=f.parentNode;f.appendChild(e)}return f.offsetWidth,f.offsetHeight,w=e.offsetHeight||e.offsetWidth,f.removeChild(e),w}}else return 0}function a(n,t){var r,i;return t=t||document.body,r=f[n],r||(i=c(n),t.style[i]===undefined&&(i=v(i,t)||n),r=f[n]=i),r}function v(n,t){for(var r=c("-"+n),i=e.length;i--;)if(n=e[i]+r,t.style[n]!==undefined)return n;return""}function c(n){return n.replace(/-(\w)/g,function(n,t){return t.toUpperCase()})}function y(n){return n.replace(/([A-Z])/g,function(n){return"-"+n.toLowerCase()})}var s,h,f,e;this.get_relative_pos=o;this.get_absolute_pos=l;this.offset_includes_borders=i;this.get_bounding_client_rect_offsets=r;s=function(){function t(n,t){n.style.opacity=t}function i(n,t){t*=100;var i;try{i=n.filters.item("DXImageTransform.Microsoft.Alpha");t<100?(i.Opacity=t,i.enabled||(i.enabled=!0)):i.enabled=!1}catch(r){t<100&&(n.style.filter=(n.currentStyle||n.runtimeStyle).filter+" progid:DXImageTransform.Microsoft.Alpha(opacity="+t+")")}}var n=document.createElement("div");return typeof n.style.opacity!="undefined"&&t||typeof n.style.filter!="undefined"&&i||function(){}}();this.set_opacity=s;h=function(){function i(n){return parseFloat(n.style.opacity)||t(n,"opacity")}function r(n){var t=n.filters["DXIMageTransform.Microsoft.Alpha"];return t?t.Opacity/100:1}var n=document.createElement("div");return typeof n.style.opacity!="undefined"&&i||typeof n.style.filter!="undefined"&&r||function(){}}();this.get_opacity=h;this.get_rendered_style=t;this.normalize_style=u;f={};e=["O","ms","Moz","Webkit"];this.get_camelized_style_name=a;this.get_dasherized_style_name=y};n.Events=new function(){var i=n.Helper,r=null,t=null;this.capture_mouse=function(i,u){return n.Events.release_mouse(),r=i,u!==!1&&(u=!0),i.setCapture!==undefined?i.setCapture(u):(t=function(i){var e=i.target,f,o,s;try{f=new MouseEvent(i.type,i)}catch(h){f=document.createEvent("MouseEvents");f.initMouseEvent(i.type,i.bubbles,i.cancelable,window,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget)}f.originalWhich=i.which;f.originalButtons=i.buttons;f.__defineGetter__&&(o=n.Screen.get_scroll_pos(),f.__defineGetter__("pageX",function(){return this.clientX+o.x}),f.__defineGetter__("pageY",function(){return this.clientY+o.y}));document.removeEventListener(i.type,t,!0);f.captureTarget=e;s=r;u||n(r).has(e)&&(s=e);s.dispatchEvent(f);t!==null&&document.addEventListener(i.type,t,!0);delete f.captureTarget;i.stopPropagation()},document.addEventListener("mouseover",t,!0),document.addEventListener("mouseout",t,!0),document.addEventListener("mousemove",t,!0),document.addEventListener("mouseup",t,!0),document.addEventListener("mousedown",t,!0),document.addEventListener("click",t,!0),document.addEventListener("dblclick",t,!0)),this};this.release_mouse=function(){return r!==null&&(r.releaseCapture!==undefined?r.releaseCapture():(document.removeEventListener("mouseover",t,!0),document.removeEventListener("mouseout",t,!0),document.removeEventListener("mousemove",t,!0),document.removeEventListener("mouseup",t,!0),document.removeEventListener("mousedown",t,!0),document.removeEventListener("click",t,!0),document.removeEventListener("dblclick",t,!0)),r=t=null),this};this.get_capture_target=function(n){return n.captureTarget||n.srcElement||n.target};this.Pseudo=new function(){function r(n,t,i){this.pseudoName=n;this.getNativeName=t;this.getProxiedHandler=i}function l(n,t,i){if(n===t)return!1;for(var r=0;t&&t!=n;)r++,t=t.parentNode;return i=i||r,t===n&&i===r}function y(n){var u=i.get_guid(n),r=t[u];return r||(r=t[u]=function(t){var i=t.relatedTarget;i&&this!==i&&!l(this,i)&&n.call(this,t)}),r}function p(n){var u=i.get_guid(n),r=t[u];return r||(r=t[u]=function(t){var i=t.relatedTarget;i&&(this===i||l(this,i))||n.call(this,t)}),r}function w(r){if(!n.Browser.is_gecko)return r;var f=i.get_guid(r),u=t[f];return u||(u=t[f]=function(n){n.wheelDelta=-40*n.detail;r.call(this,n);n.wheelDelta=null}),u}function h(r){if(!(n.Browser.is_ie||n.Browser.is_edge))return r;var e=i.get_guid(r),u=t[e];return u||(u=t[e]=function(t){var o,u,s,h,e;if(t.pointerType===t.MSPOINTER_TYPE_TOUCH||t.pointerType==="touch"){t.type==="MSPointerUp"||t.type==="pointerup"||t.type==="MSPointerCancel"||t.type==="pointercancel"?delete f[t.pointerId]:(o=n.Screen.get_mouse_pos(t),f[t.pointerId]={_$targetId:i.get_guid(t.target),identifier:t.pointerId,pageX:o.x,pageY:o.y});s=[];h=[];for(u in f)f.hasOwnProperty(u)&&f[u]&&(e=f[u],s.push(e),e._$targetId===i.get_guid(t.target)&&h.push(e));t.touches=s;t.targetTouches=h;(t.type==="MSPointerDown"||t.type==="pointerdown")&&(t.preventDefault=b);r.call(this,t);t.touches=t.targetTouches=null}}),u}function b(){u[this.pointerId]=!0;var t=n.Browser.is_ie&&n.Browser.ie_version<11;return document.addEventListener(t?"MSPointerUp":"pointerup",a,!0),document.addEventListener("click",v,!0),(t?MSPointerEvent:PointerEvent).prototype.preventDefault.call(this)}function a(n){e=n.pointerId;u[e]&&(u[e]=!1)}function v(t){var i,r=0,f;for(i in u)i=parseInt(i),u[i]===!1&&delete u[i]||r++,i===e&&(t.stopPropagation()||t.preventDefault());r===0&&(f=n.Browser.is_ie&&n.Browser.ie_version<11,document.removeEventListener(f?"MSPointerUp":"pointerup",a,!0),document.removeEventListener("click",v,!0))}function c(){}var e=null,u={},t={},f={},o=n.Browser.is_ie&&n.Browser.ie_version<11,s={touchstart:o?"MSPointerDown":"pointerdown",touchend:o?"MSPointerUp":"pointerup",touchmove:o?"MSPointerMove":"pointermove",touchcancel:o?"MSPointerCancel":"pointercancel"};return r.prototype.add=function(n,t,i){n.add_event(this.getNativeName(this.pseudoName),this.getProxiedHandler(t,n),i,!0)},r.prototype.remove=function(r,u,f){r.remove_event(this.getNativeName(this.pseudoName),this.getProxiedHandler(u,r,!0),f,!0);var e=i.get_guid(u);e&&delete t[e];this.pseudoName==="touchstart"&&n(document).remove_event("touchend",c,!0).remove_event("touchcancel",c,!0)},{mouseenter:new r("mouseenter",function(){return"mouseover"},function(n){return y(n)}),mouseleave:new r("mouseleave",function(){return"mouseout"},function(n){return p(n)}),mousewheel:new r("mousewheel",function(t){return n.Browser.is_gecko?"DOMMouseScroll":t},function(n){return w(n)}),touchstart:new r("touchstart",function(t){return n.Browser.is_ie||n.Browser.is_edge?s[t]:t},function(t,i,r){return r||n(document).add_event("touchend",c,!0).add_event("touchcancel",c,!0),h(t)}),touchend:new r("touchend",function(t){return n.Browser.is_ie||n.Browser.is_edge?s[t]:t},function(n){return h(n)}),touchmove:new r("touchmove",function(t){return n.Browser.is_ie||n.Browser.is_edge?s[t]:t},function(n){return h(n)}),touchcancel:new r("touchcancel",function(t){return n.Browser.is_ie||n.Browser.is_edge?s[t]:t},function(n){return h(n)})}}},function(){var u=n.Helper,e=n.Internals,i,t,o={},f={},r={load:!1,unload:!1,focus:!1,blur:!1,beforeunload:!1,stop:!1,beforeprint:!1,afterprint:!1,propertychange:!1,filterchange:!1,readystatechange:!1,losecapture:!1};n.ext.add_event=function(){function s(t,i,r,u){for(var f,s=t?t.split(","):[],o=0;o0&&i.handlerCount--,i.remainingHandlers=i.handlerCount)}for(var c,a=t?t.split(","):[],l=0;l0;)if(r)r=r.parentNode;else break;return n(r)};n.ext.get_sibling=function(t,i){var f=this[i||0],r=f;if(t!==0)for(var e=t>0?"nextSibling":"previousSibling",o=Math.abs(t),u=0;u0},function(){var t=n.Helper;n.ext.unique=function(){return n(t.unique(this.entities()))}}(),function(){var t=n.Style.get_rendered_style;n.ext.get_style_pos=function(n){var i=this[n||0];return{x:parseFloat(t(i,"left")),y:parseFloat(t(i,"top"))}}}(),function(){var t=n.Style.get_absolute_pos;n.ext.get_absolute_pos=function(n){var i=this[n||0];return i&&t(i)||{x:0,y:0}}}(),function(){var t=n.Style.get_relative_pos;n.ext.get_relative_pos=function(n){var i=this[n||0];return i&&t(i)||{x:0,y:0}}}(),function(){n.ext.get_scroll_pos=function(t){var r=this[t||0],i={x:0,y:0};return r===window?typeof pageYOffset!="undefined"?(i.x=window.pageXOffset,i.y=window.pageYOffset):n.Browser.is_in_quirks_mode||typeof document.documentElement.scrollTop=="undefined"?typeof document.body.scrollTop!="undefined"&&(i.x=document.body.scrollLeft,i.y=document.body.scrollTop):(i.x=document.documentElement.scrollLeft,i.y=document.documentElement.scrollTop):(i.x=r.scrollLeft,i.y=r.scrollTop),i}}();n.ext.animate=function(t,i,r,u,f){function l(n,t,i){switch(n){case"+":return t+i;case"-":return t-i;case"*":return t*i;case"/":return t/i;default:return i}}function s(t,i){var r=n(t).get_style(i)+"",u=parseFloat(r);return e.units[i]=r.replace(u,""),u}function a(n,i){var e=s(n,i),r=t[i]+"",u=r.match(/^[+\-*\/]/),f=u&&u[0]||"noOp";return r=Number(r.replace(f,"")),l(f,e,r)}var e={units:{},ops:{}},h={},o,c;for(o in t)e[o]=s,h[o]=a;return c=n.Effects.Storyboard.create(this,e,h,function(t,i){var f=n(t),r,u;for(r in i)r!=="units"&&(u={},u[r]=i[r]+e.units[r],f.set_style(u))},i,r,u,f),c.begin(),this};n.ext.bounce=function(t,i,r,u,f){function e(t){return n(t).get_style_pos().y}t===null&&(t=e);var o=n.Effects.Storyboard.create(this,{top:t},{top:i},function(n,t){n.style.top=Math.ceil(t.top)+"px"},r,u,f,n.Effects.Easing.Bounce.ease_out);return o.begin(),this},function(){function t(t,i,r,u,f){this.set_style({zoom:1});t===null&&(t=function(t,i){return Number(n(t).get_style(i))});var e=n.Effects.Storyboard.create(this,{opacity:t},{opacity:i},function(t,i){n(t).set_style({opacity:i.opacity})},r,u,f,null);return e.begin(),this}n.ext.fade_to=t;n.ext.fade_in=function(n,i,r,u,f,e){return t.call(this,n,i,r,u,f,e)};n.ext.fade_out=function(n,i,r,u,f,e){return t.call(this,n,i,r,u,f,e)}}();n.ext.slide=function(t,i,r,u,f,e){function o(t,i){i=i==="left"?"x":"y";var r=t.__pos;return r||(r=t.__pos=n(t).get_style_pos()),i==="y"&&(t.__pos=n.undefined),r[i]}t===null&&(t={x:o,y:o});var s=Math.round,h=n.Effects.Easing.Exponential.ease_in_out,c=n.Effects.Storyboard.create(this,{left:t.x,top:t.y},{left:i.x,top:i.y},function(n,t){n.style.top=s(t.top)+"px";n.style.left=s(t.left)+"px"},r,u,f,e||function(n){return h(n,4)});return c.begin(),this};n.ext.scroll_to=function(t,i,r,u){var f=n.Screen.get_scroll_pos(),e=n(this[0]).get_absolute_pos(),o=Math.round,s=n.Effects.Easing.Exponential.ease_out,h=n.Effects.Storyboard.create([window],{scrollX:f.x,scrollY:f.y},{scrollX:e.x,scrollY:e.y},function(n,t){n.scrollTo(o(t.scrollX),o(t.scrollY))},t,i,r,u||function(n){return s(n,4)});return h.begin(),this};n.ext.veil=function(t,i,r,u,f){function l(t,i){var r=parseInt(n(t).get_style(i),10);return t[h]=t[h]||{},t[h][i]=r}var e=n.Effects.Enums.Directions,h,o,s,c;return t=Math.floor(t)||e[t]||e.vertically,h="_$gimme$_veil",o={},s={},(t&e.vertically)===e.vertically&&(s.height=s.paddingTop=s.paddingBottom=l,o.height=o.paddingTop=o.paddingBottom=0),(t&e.horizontally)===e.horizontally&&(s.width=s.paddingLeft=s.paddingRight=l,o.width=o.paddingLeft=o.paddingRight=0),c=n.Effects.Storyboard.create(this.filter(function(t){var i=t.style.display||n(t).get_style("display");return i!=="none"}),s,o,function(n,i){var r=n.style;(t&e.vertically)===e.vertically&&(r.height=i.height+"px",r.paddingTop=i.paddingTop+"px",r.paddingBottom=i.paddingBottom+"px");(t&e.horizontally)===e.horizontally&&(r.width=i.width+"px",r.paddingRight=i.paddingRight+"px",r.paddingLeft=i.paddingLeft+"px")},i,r,u,f||function(t){return n.Effects.Easing.Exponential.ease_in_out(t,4)}),c.get_animations().push(new n.Effects.Animation({startTime:0,elements:this,animate:function(n){n.style.overflow="hidden"}}),new n.Effects.Animation({startTime:c.get_duration(),elements:this,animate:function(n){n.style.display="none"}})),c.begin(),this};n.ext.unveil=function(t,i,r,u,f){function c(t,i){var r=t._$gimme$_veil;return r||(r=r||function(){var i=t.cloneNode(!0),r,u,f;return i.style.cssText="position:absolute;top:0;left:0;visibility:hidden;margin:0;padding:0;border:0;height:;width:;",i.style.display="block",t.parentNode.appendChild(i),i=n(i),r=parseInt(n(t).get_style("height"),10)||parseInt(i.get_style("height"),10),u=parseInt(n(t).get_style("width"),10)||parseInt(i.get_style("width"),10),i[0].style.padding=t.style.padding,f={height:r,width:u,paddingTop:parseInt(i.get_style("paddingTop"),10),paddingBottom:parseInt(i.get_style("paddingBottom"),10),paddingRight:parseInt(i.get_style("paddingRight"),10),paddingLeft:parseInt(i.get_style("paddingLeft"),10)},t.parentNode.removeChild(i[0]),t.style.overflow="hidden",f}()),r[i]}function l(){return document.fullscreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled}var e=n.Effects.Enums.Directions,o,s,h;return t=Math.floor(t)||e[t]||e.vertically,e=n.Effects.Enums.Directions,t=Math.floor(t)||e[t]||e.vertically,o={},s={},(t&e.vertically)===e.vertically&&(s.height=s.paddingTop=s.paddingBottom=0,o.height=o.paddingTop=o.paddingBottom=c),(t&e.horizontally)===e.horizontally&&(s.width=s.paddingLeft=s.paddingRight=0,o.width=o.paddingLeft=o.paddingRight=c),h=n.Effects.Storyboard.create(this.filter(function(t){var i=t.style.display||n(t).get_style("display");return i==="none"||i===null}),s,o,function(n,i){(t&e.vertically)===e.vertically&&(n.style.height=i.height+"px",n.style.paddingTop=i.paddingTop+"px",n.style.paddingBottom=i.paddingBottom+"px");(t&e.horizontally)===e.horizontally&&(n.style.width=i.width+"px",n.style.paddingRight=i.paddingRight+"px",n.style.paddingLeft=i.paddingLeft+"px")},i,r,u,f||function(t){return n.Effects.Easing.Exponential.ease_in_out(t,4)}),h.get_animations().push(new n.Effects.Animation({startTime:0,elements:this,animate:function(n){n.style.overflow="hidden";n.style.display="block"}}),new n.Effects.Animation({startTime:h.get_duration(),elements:this,animate:function(n){n.style.overflow=""}})),n.ext.exit_full_screen=function(){l()&&(document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.exitFullscreen())},n.ext.set_full_screen=function(n){n&&l()&&(n.webkitRequestFullScreen?n.webkitRequestFullScreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen():n.msRequestFullscreen?n.msRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.requestFullscreen())},h.begin(),this};n.toString=function(){return"Gimme v2.7.0 (Edmund) :: Thursday, June 28, 2012 3:44:28 PM"},function(){function o(t){return n.Effects.Easing.Exponential.ease_in_out(t,4)}function s(){return document.fullscreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled?!0:!1}var i=n.ext,e=300,h=new RegExp('["\\b\\f\\n\\r\\t\\\\\\x00-\\x1F]',"i"),t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=new RegExp("/[^A-Za-z0-9+/=]","g"),u=64,l=63,f=n.Internals;i.append=function(t){var i=this,r=i[0];return r&&n(t).for_each(function(n){var t=n.parentNode;t!==r&&(n.getRootElement?(n=n.getRootElement(),i.append(n)):r.appendChild(n))}),i};i.insertBefore=function(t,i){var r=this[0];return i.length&&(i=i[0]),r&&n(t).for_each(function(n){r.insertBefore(n,i)}),this};i.appendTo=function(t){return t=n(t)[0],t&&this.for_each(function(n){n.parentNode!==t&&t.appendChild(n)}),this};i.getParent=i.parent;i.appendText=function(n){return this.for_each(function(t){t.appendChild(document.createTextNode(n))}),this};i.appendHTML=function(n){return this.for_each(function(t){sj_appHTML(t,n)}),this};i.fadeIn=function(t,i,r,u){function h(){r&&r()}var f=this[0],s;return t=n(t),s=t.get_style("opacity")||1,t.set_style({opacity:0}),u?f.insertBefore(t[0],f.firstChild):t.appendTo(f),t.fade_in(0,s,i||e,null,h,o),this};i.fadeOut=function(n,t,i){function f(){n&&r.removeFromParent();i&&i()}var r=this,u=this.get_style("opacity")||1;return r.fade_out(u,0,t||e,null,f,o),this};i.fadeToChild=function(t,i,r){function l(){t.set_style({zIndex:h});f.removeFromParent();r&&r()}var s=this[0],u;t=n(t);u=t.get_style("opacity")||1;t.set_style({opacity:0}).appendTo(s);var h=t.get_style("zIndex")||0,c=this.select(">*").set_style({position:"absolute",top:0,left:0,zIndex:0}),f=c.filter(function(n){return t.index_of(n)===-1});return f.length?t.fade_in(0,u,i||e,null,l,o):t.set_style({opacity:1}),this};i.removeFromParent=function(){return this.for_each(function(n){n.parentNode&&n.parentNode.removeChild(n)}),this};i.get_size=function(){return new b(this[0].clientWidth,this[0].clientHeight)};i.clear=function(){return this.for_each(function(n){for(var t=n.lastChild;t;)n.removeChild(t),t=n.lastChild}),this};i.set_text=function(n){return this.clear(),this.for_each(function(t){t.appendChild(document.createTextNode(n))}),this};i.getOpacity=function(){return parseFloat(this.get_style("opacity"))};i.fireEvent=function(n){return this.for_each(function(t){var r,i;document.createEventObject?(r=document.createEventObject(),t.fireEvent("on"+n,r)):(i=document.createEvent("HTMLEvents"),i.initEvent(n,!0,!0),t.dispatchEvent(i))}),this};i.inlineDataSvgs=function(){var i=/^(?:url\(['"]?)?data:(.+);base64,([^'")]+)(?:['"]?\))?$/,u=new DOMParser,t=this;return t.iterate(function(f){var e=t[f],w=e.children&&e.children.length||e.textContent&&e.textContent.trim(),s,a,y,v,o,h,p,c,l;if(!w&&(s=n(e).get_style("background-image").match(i),s&&(a=s[1],y=s[2],a==="image/svg+xml")))try{if(v=u.parseFromString(atob(y),a),o=v&&v.rootElement,!o||o.tagName!=="svg")return;for(h=e.attributes,p=h&&h.length,c=0;c=0&&i.left>=0&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)-u&&i.right<=(window.innerWidth||document.documentElement.clientWidth)};i.exit_full_screen=function(){s()&&(document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.exitFullscreen())};i.set_full_screen=function(n){n&&s()&&(n.webkitRequestFullScreen?n.webkitRequestFullScreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen():n.msRequestFullscreen?n.msRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.requestFullscreen())};f.stringify=function(n,t){function i(n,t){var u,r,i;if(t=t+'"',h.test(n))for(u=n.length,r=0;r=" ")(i==="\\"||i==='"')&&(t=t+"\\"),t=t+i;else switch(i){case"\b":t=t+"\\b";break;case"\f":t=t+"\\f";break;case"\n":t=t+"\\n";break;case"\r":t=t+"\\r";break;case"\t":t=t+"\\t";break;default:t=t+"\\u00";i.charCodeAt()<16&&(t=t+"0");t=t+i.charCodeAt().toString(16)}else t=t+n;return t+'"'}function r(n,t){var f,u,e;switch(typeof n){case"object":if(n)if(n instanceof Number)t=t+n.toString();else if(n instanceof Boolean)t=t+n.toString();else if(n instanceof String)t=i(n,t);else if(n instanceof Array){for(t=t+"[",u=0;u0&&(t=t+","),t=r(n[u],t);t=t+"]"}else{t=t+"{";u=0;for(f in n)n.hasOwnProperty(f)&&(e=n[f],typeof e!="undefined"&&typeof e!="function"&&(u>0&&(t=t+","),u++,t=i(f,t),t=t+":",t=r(e,t)));t=t+"}"}else t=t+"null";break;case"number":case"boolean":t=t+n.toString();break;case"string":t=i(n,t);break;default:t=t+"null"}return t}function f(n){return r(n,"")}var u=window.JSON&&window.JSON.stringify;return u&&!t?u(n):f(n)};f.base64Encode=function(n){if(!n||n.length===0)return n;for(var s=n.length,h=s%3,c=s-h,i="",f,e,o,r=0;r>2),i+=t.charAt((f&3)<<4|(e&240)>>4),i+=t.charAt((e&15)<<2|(o&192)>>6),i+=t.charAt(o&l);r=c;f=n.charCodeAt(r);e=n.charCodeAt(r+1);switch(h){case 1:i+=t.charAt((f&252)>>2);i+=t.charAt((f&3)<<4);i+=t.charAt(u);i+=t.charAt(u);break;case 2:i+=t.charAt((f&252)>>2);i+=t.charAt((f&3)<<4|(e&240)>>4);i+=t.charAt((e&15)<<2);i+=t.charAt(u)}return i};f.base64Decode=function(n){var h,l,r,i,s,e,f,o;if(!n||n.length===0)return n;if(h=n.length,h%4!=0||c.exec(n))throw new Error("Not a valid base64 encoded string");for(l=h-4,r="",i=0;i>4),r+=String.fromCharCode((t.indexOf(e)&15)<<4|t.indexOf(f)>>2),r+=String.fromCharCode((t.indexOf(f)&3)<<6|t.indexOf(o));return i=l,s=n.charAt(i),e=n.charAt(i+1),f=n.charAt(i+2),o=n.charAt(i+3),r+=String.fromCharCode(t.indexOf(s)<<2|t.indexOf(e)>>4),t.indexOf(f)!==u&&(r+=String.fromCharCode((t.indexOf(e)&15)<<4|t.indexOf(f)>>2)),t.indexOf(o)!==u&&(r+=String.fromCharCode((t.indexOf(f)&3)<<6|t.indexOf(o))),r};f.isTouchDevice=function(){var n=window.navigator&&(window.navigator.msPointerEnabled||window.navigator.pointerEnabled)||window.PointerEvent,t=n&&window.MSGesture;return"ontouchstart"in window||t||window.DocumentTouch&&document instanceof DocumentTouch};f.HTMLEncode=function(n){return n.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}}(),function(n){var t=function(){var n,t,i;try{return n=(new Date).toString(),t=window.localStorage,t.setItem(n,n),i=t.getItem(n)===n,t.removeItem(n),i&&t}catch(r){}}(),i=function(){function n(){}return n.isEnabled=function(){return!!t},n.getItem=function(i){var r,u,f,e;return t?(r=t.getItem(i),r&&(u=n._generateExpirationKey(i),f=t.getItem(u),f&&(e=parseInt(f),Date.now()>e&&(r=null,t.removeItem(i),t.removeItem(u)))),r):null},n.setItem=function(i,r,u){t&&((!isFinite(u)||u>0)&&t.setItem(i,r),u>0&&t.setItem(n._generateExpirationKey(i),(Date.now()+u*864e5).toString()))},n.removeItem=function(i){if(t){var r=n._generateExpirationKey(i);t.removeItem(i);t.removeItem(r)}},n._generateExpirationKey=function(n){return"_$Maps_"+n+"_expiration"},n}();n.LocalStorageCache=i}(kt||(kt={}));var u=window.$MicrosoftMaps8,i=u.GlobalConfig,p=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),h=function(){function n(n,t,i){this.x=n;this.y=t;this.z=i}return n.prototype.add=function(t){return this.z&&t.z?new n(this.x+t.x,this.y+t.y,this.z+t.z):new n(this.x+t.x,this.y+t.y)},n.prototype.subtract=function(t){return this.z&&t.z?new n(this.x-t.x,this.y-t.y,this.z-t.z):new n(this.x-t.x,this.y-t.y)},n.prototype.clone=function(){return new n(this.x,this.y,this.z)},n.prototype.equals=function(t,i){return n.pointsEqual(this,t,i)},n.pointsEqual=function(n,t,i){return n&&t?i>0?Math.abs(n.x-t.x)<=i&&Math.abs(n.y-t.y)<=i:n.x===t.x&&n.y===t.y&&n.z===t.z:!1},n.prototype.toString=function(){return typeof this.z=="undefined"?"[Point ("+this.x+", "+this.y+")]":"[Point ("+this.x+", "+this.y+", "+this.z+")]"},n.prototype.scalarMultiply=function(t){return new n(this.x*t,this.y*t,this.z?this.z*t:null)},n.prototype.invert=function(){return new n(-this.x,-this.y,this.z?-this.z:null)},n}(),b=function(){function n(n,t){this.width=n;this.height=t}return n.Auto=new n(-1,-1),n}(),nu=function(){function n(n,t,i){r.assertIsFunction(n,"handler");r.assert(isFinite(t)&&t>0,"Argument: interval should be a positive number.");this.handler=n;this._interval=t;this._eventFilter=i;this._nextScheduledEventId=null}return n.prototype.invoke=function(n){var i=this,t;this._isScheduled()?(this._eventFilter&&(n=this._eventFilter(this._nextScheduledEventArgs,n)),this._nextScheduledEventArgs=n):(t=Date.now(),this._lastRaisedTime&&this._lastRaisedTime0,"Argument: throttleInterval should be a positive number."),this._throttledEventInvokers.push(new nu(n,t,i)),{dispose:function(){return u._removeThrottledEventHandler(n)}}},n.prototype.remove=function(n){var t;if(typeof n=="function"){for(t=this._handlers.length;t--;)if(this._handlers[t]===n){this._handlers.splice(t,1);return}}else for(t=this._throttledEventInvokers.length;t--;)if(this._throttledEventInvokers[t].handler===n){this._throttledEventInvokers[t].dispose();this._throttledEventInvokers.splice(t,1);return}},n.prototype.invoke=function(n){var i,t,u,r;for(this.lastInvokedArgs=n,this.isPreviouslyInvoked=!0,i=this._handlers.slice(0),t=0,u=i.length;t0},n.prototype.isHandlerRegistered=function(n){return this._handlers.some(function(t){return n===t})||this._throttledEventInvokers.some(function(t){return n===t.handler})},n.prototype.dispose=function(){this._handlers=[];for(var n=this._throttledEventInvokers.length;n--;)this._throttledEventInvokers[n].dispose();this._throttledEventInvokers=[];this.lastInvokedArgs=null},n.prototype._removeThrottledEventHandler=function(n){for(var t=this._throttledEventInvokers.length;t--;)if(this._throttledEventInvokers[t].handler===n){this._throttledEventInvokers[t].dispose();this._throttledEventInvokers.splice(t,1);return}},n}(),a=function(){function t(){}return t.getValue=function(n,i){if(r.assertNotNull(n,"object"),r.assertNotNullOrEmpty(i,"name"),n.hasOwnProperty(i))return n[i];var u=n["get"+t.capitalizeProp(i)];return u?u.call(n):n.get?n.get(i):n.length===1&&n.constructor===t._gimmeConstructor?t.getValue(n[0],i):n[i]},t.mergeProperties=function(n,t){var i,r;for(i in t)r=t[i],t.hasOwnProperty(i)&&r!==undefined&&(n[i]=r)},t.setValue=function(n,i,u,f){r.assertNotNull(n,"object");r.assertNotNullOrEmpty(i,"name");f||t.cancelAnimation(n,i);var e=n["set"+t.capitalizeProp(i)];e?e.call(n,u):n.set?n.set(i,u):n.set_attr?u===null&&n.remove_attr?n.remove_attr(i):n.set_attr(i,u):n[i]=u},t.capitalizeProp=function(n){return(typeof n=="string")?n.charAt(0).toUpperCase()+n.substring(1):n},t.areEqual=function(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(n instanceof Array&&i instanceof Array&&!n.length&&!i.length)return!0;if(typeof n=="object"&&n&&i&&n.constructor===Object&&i.constructor===Object){for(var r in n)if(n.hasOwnProperty(r)&&!t.areEqual(n[r],i[r]))return!1;for(r in i)if(i.hasOwnProperty(r)&&!t.areEqual(n[r],i[r]))return!1;return!0}return n===i},t._lerp=function(n,i,r){if(typeof n==typeof i)switch(typeof n){case"object":var f={};for(var u in n)n.hasOwnProperty(u)&&(f[u]=t._lerp(n[u],i[u],r));return f;case"number":return n+(i-n)*r;case"boolean":return r<.5?n:i}},t.cancelAnimation=function(n,i){var r=n[t._animationPrefix+i];r&&(r.onStop&&r.onStop(),r.abort(),n[t._animationPrefix+i]=null)},t.hasAnimation=function(n,i){return!!n[t._animationPrefix+i]},t.animate=function(i,u,f){function w(n){for(var i,t=0;t=o*n){l=t===0?p:e[t-1];h=i;c=l.time/o;a=h.time/o;break}}function k(n,r){r=r.value;e&&(ra)&&w(r);var o=(r-c)/(a-c),s;s=typeof h.value=="function"?h.value(o):t._lerp(l.value,h.value,o);t.setValue(i,u,s,!0);f.frameCallback&&f.frameCallback(r)}function d(){i[t._animationPrefix+u]=null;f.repeat?s.begin():f.autoReverse?s.reverse():(f.onStop&&f.onStop(),f.onComplete&&f.onComplete())}var y,s;r.assertNotNull(i,"obj");r.assertNotNullOrEmpty(u,"prop");r.assertNotNull(f,"options");r.assertNotNull(f.to===0||f.to||f.keyframes,"options.to or options.keyframes");var b=f.from||t.getValue(i,u),v=f.to,e=f.keyframes,o=f.duration>=0?f.duration:e&&e[e.length-1].time||300;if(t.cancelAnimation(i,u),o===0){t.setValue(i,u,v);return}y=f.easing&&t._easingFuncs[f.easing]||f.easing||t._easingFuncs.basic;s=n.Effects.Storyboard.create([i],{value:0},{value:1},k,o,null,d,y);i[t._animationPrefix+u]=s;s.begin();var p={time:0,value:b},l=p,h={time:o,value:v},c=0,a=1;e&&w(0)},t.addPropertyValue=function(n,i,r){var u=t.getValue(n,i)||"",o,f,s,e;if(r&&typeof u=="string"){for(o=r.split(/\s+/),f=0,s=o.length;fthis.length)&&(t=this.length),this.substring(t-n.length,t)===n});String.prototype.startsWith||(String.prototype.startsWith=function(n,t){return(!t||t<0)&&(t=0),this.substring(t,t+n.length)===n});String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});String.prototype.replaceAll||(String.prototype.replaceAll=function(n,t){for(var i=this,r=i.indexOf(n);r!==-1;)i=i.replace(n,t),r=i.indexOf(n);return i}),function(f){function at(){return lt++}function vt(n,t,i){return Math.min(Math.max(n,t),i)}function yt(n){for(var i,r={},u=Object.keys(n),t=0,f=u.length;ts?f=u-1:e=u+1;return h}function tt(n,t,i,r){var f,o;r===void 0&&(r=a.getValue);for(var s=r(t,i),u=0,e=n.length;e>u;)f=(u+e)/2|0,o=r(n[f],i),o<=s?u=f+1:e=f;return u}function ri(n,t,i,r){var u,f,e;if(r===void 0&&(r=a.getValue),u=nt(n,t,i,r),f=n.length,u>=0)for(e=r(t,i);u=50&&i;return n=n&&s?Math.round(n):n,t?n<.1?(n*=1e3,e=v.L_DistanceUnitMeters_Text,o=0):e=v.L_DistanceUnitKm_Text:n<.1?(n*=5280,e=v.L_DistanceUnitFeetShort_Text,o=0):e=u.GlobalConfig.features.directions.bestModeEnabled&&r?v.L_DistanceUnitMilesLongText_Text:v.L_DistanceUnitMilesShortText_Text,f._formatString(v.L_Distance_Format,f._toFixed(n,s?0:o),e)}function ci(n,t,i){return i===void 0&&(i=6),f._formatString(v.L_LatLon_Format,f._toFixed(n,i),f._toFixed(t,i))}function li(n,t){return n.toFixed(t).replace(".",u.GlobalConfig.dynamicProperties.cultureData.numberDecimalSeparator)}function l(n,t,i){var r=t+t;return n.indexOf(r)<0?n.replace(t,i):n.replace(r,(i<10?"0":"")+i)}function ai(n,t){return h(n,i.dynamicProperties.cultureData.shortDatePattern,t)}function vi(n){return h(n,i.dynamicProperties.cultureData.longDatePattern)}function yi(n){var t=i.dynamicProperties.cultureData.longDatePattern;return t=t.replace("dddd","ddd"),t=t.replace("MMMM","MMM"),h(n,t)}function pi(n){return h(n,i.dynamicProperties.cultureData.yearMonthPattern,!1,!0)}function wi(n){return h(n,i.dynamicProperties.cultureData.weekMonthDayPattern)}function bi(n,t){t===void 0&&(t=!1);var u=t?Math.ceil(n/60):Math.round(n/60),i=u%60,r=Math.floor(u/60);return r===0?f._formatString(v.L_Duration_Min,i):i===0?f._formatString(v.L_Duration_NoMin,r):f._formatString(v.L_Duration,r,i)}function ki(n){return f._formatShortTimeString(n.getHours(),n.getMinutes(),n.getSeconds())}function di(n){return f._formatShortTimeString(n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds())}function gi(n,t,i){var f=u.GlobalConfig.dynamicProperties.cultureData,e,o,r=f.shortTimePattern,s=r.indexOf("H")<0;return s?(o=n>=12,n=af(n),e="h"):e="H",r=l(r,e,n),r=l(r,"m",t),r=l(r,"s",i),s&&(r=r.replace("tt",o?f.pmDesignator:f.amDesignator)),r.replace(/:/g,f.timeSeparator)}function nr(n){return f._formatUTCTimeString(new Date(f._getTime(n)))}function tr(n){var t=n&&n.match(/\((\d+)([-,+]?)(\d{2})?(\d{2})?\)/),i;if(t&&t[1]&&(i=parseInt(t[1],10),t[2]&&t[3]&&t[4])){var f=t[2]==="-"?-1:1,r=parseInt(t[3],10),u=parseInt(t[4],10);isNaN(r)||isNaN(u)||(i+=f*(r*60+u)*6e4)}return i}function ir(){function n(){return((1+Math.random())*65536|0).toString(16).substr(1)}return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()}function y(n,t,i){i===void 0&&(i=!0);var f=encodeURI(t).replace(/[\.\(\)\*\+]/g,"\\$&"),e="^(?:.*[&\\?]"+f+"=([^&]*))?.*$",r=new RegExp(e,"i").exec(n.search),u=r&&r[1]||"";return i?decodeURIComponent(u):u}function rr(n,t){if(n===t)return!0;if(!n||!t||n.length!==t.length)return!1;for(var i=n.length-1;i>=0;){if(n[i]!==t[i])return!1;--i}return!0}function ur(n,t){return n===t}function fr(){var n=y(window.location,"perftest");return n==="true"||n==="1"}function er(){return y(window.location,"polygon")}function or(){var n=parseFloat(y(window.location,"dpr"));return n||window.devicePixelRatio||1}function sr(){return window.matchMedia("(-ms-high-contrast:active)").matches}function hr(n,t){if(n&&n!==16777215&&n!==4294967295){for(var i=n.toString(16);i.length<6;)i="0"+i;return i.length===8&&(i=i.substr(2)),"#"+i}return t||""}function cr(n){var t=(n&16711680)>>16,i=(n&65280)>>8,r=n&255;return(t*.299+i*.587+r*.114)/256}function lr(){var n=s();return n&&n.dynamicProperties?n.isMapsAnswer&&n.dynamicProperties.largeMapShownOnSerp:!1}function ar(){var n=s();return n&&n.dynamicProperties?n.isMapsAnswer&&!n.dynamicProperties.largeMapShownOnSerp:!1}function vr(){var n=s(),t=n&&n.dynamicProperties;return t?n.isMapsAnswer&&t.localOverlayOnSerp&&t.localOverlayOnSerp.visible:!1}function yr(){var n=s(),t=n&&n.dynamicProperties;return t?n.isMapsAnswer&&t.realEstateOverlayOnSerp&&t.realEstateOverlayOnSerp.visible:!1}function pr(){var n=s(),t=n&&n.dynamicProperties;return t?n.isMapsAnswer&&t.travelOverlayOnSerp&&t.travelOverlayOnSerp.visible:!1}function wr(){var n=s();return!n||n.isSDK}function br(){return typeof _G!="undefined"}function kr(){return f._isLocalOverlayShownOnSerp()||f._isRealEstateOverlayShownOnSerp()}function dr(n,t,i){var u=document.createElement("style"),r,f;return u.type="text/css",r=".MicrosoftMap .taskCard.focus .titleBar.",f="".concat(r).concat(n,",\n ").concat(r,"hover.").concat(n,",\n ").concat(r).concat(n," .catIcon,\n ").concat(r,"hover.").concat(n," .catIcon,\n ").concat(r).concat(n," .").concat(i,".titleIcon,\n ").concat(r,"hover.").concat(n," .").concat(i,".titleIcon\n {background-color:").concat(t,"}"),u.innerHTML=f,u}function gr(n){var r,f,t,u,i;if(n)if(Array.isArray(n)){for(r=n,t=0,u=r.length;t=t.slideoutMinWidth;var u={logData:{feature:"TM",action:"A",data:{isSlideEnabled:f._isSlideCardEnabled}},impressionGuid:Microsoft.Maps.GlobalConfig.dynamicProperties.mapsIG},i=Microsoft&&Microsoft.Maps&&Microsoft.Maps.GlobalDataEventHandler,r=Microsoft&&Microsoft.Maps&&Microsoft.Maps.DataHandlerKeys;i&&r&&Microsoft.Maps.setTimeout(function(){i.invokeHandler(r.instrumentationDataHandlerKey,u)},2e3)}return f._isSlideCardEnabled}function fu(n){uu=n}function eu(){var t=n(".bm_newSidebar");return t.length===0?0:t.get_size().width+1}function ou(){var n=Microsoft.Maps.GlobalConfig.features.taskFramework;return n&&n.enableBoldUXChanges&&b}function su(n){b=n}function hu(){var t=n(".MicrosoftMap .taskBar");return t.length>0?t.get_size().height:0}function cu(n){var t=Microsoft&&Microsoft.Maps&&Microsoft.Maps.GlobalConfig;return t&&t.features[n]&&t.features[n].isEnabled}function lu(n){var i=Microsoft&&Microsoft.Maps&&Microsoft.Maps.Internal,t;return i?(t=i._CoreConfig(),n.replace("{protocol}",t.urlProtocol).replace("{tfeDomainDynamic}",t.tfeDomainDynamic).replace("{tfeDomainStatic}",t.tfeDomainStatic)):n}function au(n){var t=i.dynamicProperties,r=t.userRegion;return n=r&&t.isGeopolUserRegion?n.replace(/{ur}/,r):n.replace(/&ur={ur}/,""),n.replace("{mkt}",t.uiLanguage)}function vu(n,t){n&&t&&t.adProviderId&&(n.adBusinessLocationId=t.adBusinessLocationId,n.adImpressionGuid=t.adImpressionGuid,n.adProviderId=t.adProviderId,n.adQuery=t.adQuery,n.adRetailEntitySource=t.adRetailEntitySource,n.adStoreId=t.adStoreId,n.adTriggerType=t.adTriggerType,n.adYpid=t.adYpid)}function yu(t,i,r){var u=t,f;return i&&(f=i.searchQueryCategory||i.selectedCategoryId||i.category,t==="LocalListingTask"?(Microsoft.Maps.GlobalConfig.features.localSearch.enableCustomHotelsExperience&&d(f)?u="HotelsListingTask":k(f)?u="HouseListingTask":Microsoft.Maps.GlobalConfig.features.localSearch.enableCustomRestaurantsExperience&&g(f)?u="RestaurantsListingTask":et(f)?u="PolygonListingTask":Microsoft.Maps.GlobalConfig.features.localSearch.enableTopicSearchExperience&&f==="topicSearch"&&(u="TopicSearchLandingTask"),i.activatingElement=r&&n(r)):t==="LocalDetailsTask"&&(Microsoft.Maps.GlobalConfig.features.localSearch.enableCustomHotelsExperience&&d(f)?u="HotelsDetailsTask":k(f)?u="HouseDetailsTask":Microsoft.Maps.GlobalConfig.features.localSearch.enableCustomRestaurantsExperience&&g(f)&&(u="RestaurantDetailsTask"),i.activatingElement=r&&n(r))),u}function k(n){return c(n,["house"])}function d(n){return c(n,["91572","13344","hotel","vacationrental"])}function pu(n){return c(n,["attraction","90012"])}function g(n){return c(n,["90287","90232","91649","restaurant","food & drink","food & dining"])}function et(n){return c(n,["zipcode","ZipCode"])}function wu(n){var t=ht();return t&&t[n]}function bu(n){for(var t,r,u=p(n)?n:[n],f=[],i=0;i6&&(t=0);return r.toString(16)}function ot(){return i.isMapsAnswer&&!i.isMapsVertical?!1:i.features.labels.glLabelAndPoi}function du(){var t=i.features.labels,n;t&&(t.glLabelAndPoi=!1);n=i.features.taskFramework;n&&(n.glMicroPoi=!1);i.glPolyline=!1}function gu(t){var i=n("#id_h"),r;i.length>0&&(r=i.get_style("display"),t&&r==="none"?i.set_style({display:""}):t||r==="none"||i.set_style({display:"none"}))}function nf(){sj_evt&&sj_evt.fire("onPP")}function tf(){_w&&_w.rms&&_w.rms.start&&_w.rms.start()}function rf(t){if(t.length>0){var i=n(t[t.length-1]).select(".bm_dropdownEntry");i&&i.length>0&&i[0].focus()}}function uf(){return st}function ff(n){st=n}function ef(n){var i=n,t;return n&&(t=document.createElement("textarea"),t.innerHTML=n,i=t.value),i}function sf(t){var i=Microsoft.Maps.GlobalConfig.features.taskBar;i||Microsoft.Maps.setTimeout(function(){var r=n(document).select("[data-subtaskid='".concat(t,"']")),i=r&&r.select(".menu");i.length>0&&(i[1]?i[1].click():i[0].click(),Microsoft.Maps.setTimeout(function(){var t=n(".menuPrintItem",r[0]);t.length>0&&t[0].parentElement.focus()},150))},200)}function ht(){var n=Microsoft&&Microsoft.Maps&&Microsoft.Maps.Internal;return n&&n._CoreConfig&&n._CoreConfig()}function hf(){var n=!1,t;if(ot())try{t=document.createElement("canvas");ct(t);n=!0}catch(i){}return n}function ct(n,t,r,u,f){var s=["webgl","experimental-webgl"],h,e,o;if(window.WebGLRenderingContext){for(h={antialias:r,premultipliedAlpha:!0,preserveDrawingBuffer:u,stencil:!1,failIfMajorPerformanceCaveat:!t},o=0;o=1?c.textureMulti:8),a=e.getParameter(e.MAX_TEXTURE_SIZE);if(a>=l)return e;throw new Error("Hardware texture size "+a+", does not meet the required texture size of "+l);}throw new Error("WebGL initialization failed");}throw new Error("Browser does not support WebGL");}function cf(n){var s="bm_cardWrapper",t,i,r,u,f,e,h;return n&&(s+=" "+n),t=o("div",s),i=o("div","panelWrapper left Light"),t.appendChild(i),r=o("div","panelContent"),i.appendChild(r),u=o("div","taskCard focus"),r.appendChild(u),f=o("div","cardFace"),u.appendChild(f),e=o("div","cardContent"),f.appendChild(e),h=o("div","contentRoot"),e.appendChild(h),t}function o(n,t){var i=document.createElement(n);return i.className=t,i}function lf(t){var i=n(".bm_navLeftBack"),u,r,f,e;if(t&&t.id.toLowerCase().indexOf("collection")>-1&&(i=n(".collectionBack")),i.length===0&&(i=n(".backButtonContainer"),i.length===0&&(i=n("[data-tag=detailsCardBackBtnContainer]")),(i.length===0||i.get_style("display")==="none")&&(i=null)),t&&i&&i.length>0){for(u=0;u0?r.get_attr("data-task"):null,f){if(e=JSON.parse(f),e&&e.id===t.id){r.fireEvent("click");break}}else if(t.id.toLowerCase().indexOf("collection")>-1){r.fireEvent("click");break}return!1}}function af(n){return n>12?n-=12:n||(n=12),n}function h(n,t,r,u){for(var e,v=i.dynamicProperties.cultureData,o=[],s=-1,h=t.length,f=0;f=0;if(s<0&&!a&&(s=f),s>=0&&(a||f===h-1)&&(o.push(t.substring(s,a?f:f+1)),s=-1),c===0){for(e=f+1;e1){for(e=f+1;e-1)return!0;return!1}function vf(n,t,r,u,f){var o=i.dynamicProperties.cultureData,e,c,s,h;switch(n){case"d":t>3?e=o.dayNames[u?r.getUTCDay():r.getDay()]:t===3?e=o.abbreviatedDayNames[u?r.getUTCDay():r.getDay()]:(c=u?r.getUTCDate():r.getDate(),e=(c<10&&t>1?"0":"")+c);break;case"M":s=u?r.getUTCMonth():r.getMonth();t>3?(o.monthGenitiveNames&&!f&&(e=o.monthGenitiveNames[s]),e&&e.length||(e=o.monthNames[s])):t===3?(o.abbreviatedMonthGenitiveNames&&!f&&(e=o.abbreviatedMonthGenitiveNames[s]),e&&e.length||(e=o.abbreviatedMonthNames[s])):(++s,e=(s<10&&t>1?"0":"")+s);break;case"y":h=u?r.getUTCFullYear():r.getFullYear();t>2?e=h.toString():(h%=100,e=(h<10&&t>1?"0":"")+h);break;default:e=""}return e}function yf(n){if(n){var t=n.getForegroundTask(),i=n.getFirstTask();return f._isSlideCardEnabled&&t&&i&&t!==i&&t.displayState.activationState===1&&i.displayState.activationState===2&&t.displayState.stackOrder===2&&i.displayState.stackOrder===1}return!1}function pf(t,i){var r;r=t.changed.add(function(t){var u;if(t&&t.name==="percentLoaded"&&t.newValue===1&&(r.dispose(),u=n("div[data-subtaskid="+i+"]"),u.length>0)){var f=u[0],s=n(".bm_itinDestinations",f),e="itin";s.get_style("display").indexOf("none")>-1&&(e="");var h=n(".bm_cardClose",f),o=n(".bm_ItinBack",f),c=o?o.get_style("display"):"";h.add_class(!o||c.indexOf("none")>-1?e:e+" back")}})}function wf(n,t){var u,i,r;if(!n||!t)return!1;if(n===t)return!0;for(u=t.children,i=!1,r=0;!i&&r"+t+"<\/div>","text/html").firstChild.childNodes[1].firstChild)}catch(u){return r.assert(!1,"Error parsing the response: "+u),null}}function gf(n){return!n||n.length===0||n.toLowerCase().indexOf("localguide")>-1||n.toLowerCase().indexOf("local")===-1&&n.toLowerCase().indexOf("direction")===-1&&n.toLowerCase().indexOf("polygonentitydetails")===-1}function ne(){var n=i.features.sharing;return n&&n.disableLoadingRUBRegion}function te(n,t){var i=Microsoft.Maps.GlobalConfig.features.sharing,f,r,h;if(i&&i.disableSharingLargeBoundingBox&&i.disableSharingBoundingBoxes&&i.disableSharingBoundingBoxes.length>0){var o=new e(n,t),u=i.disableSharingLargeBoundingBox,c=w.fromEdges(u.north,u.west,u.south,u.east),s=i.disableSharingBoundingBoxes;if(!c.contains(o))return!1;for(f=0;f0?this._keys[n-1].tangentOutType:c,f=h=u=t.position,e,o=s=r=t.value,i;n>0&&(f=this._keys[n-1].position,o=this._keys[n-1].value);n+10},n.prototype.hermite=function(n){var u,o,s;if(this._keys.length<2)throw new Error("More than one value is required");var e=n,i=this._keys[0],t=null;for(u=1;u=n){o=i.position;s=t.position-o;e=0;s>1e-10&&(e=(n-o)/s);n=e;break}i=t}if(i.tangentOutType===2)return n>=1?t.value:i.value;var r=n*n,f=r*n,h=i.value,c=i.tangentOutValue,l=t.tangentInValue;return h*(2*f-3*r+1)+t.value*(-2*f+3*r)+c*(f-2*r+n)+l*(f-r)},n}(),ft=function(){function n(n,t){if(n instanceof Array)this._populateColorComponents(n);else switch(t){case 1:case 2:this._parseHex(n,t);break;case 0:this._parseRgba(n);break;case 3:this._unpackColor(n)}}return n.parse=function(t,i){var u,r=n._getColorFormat(t);return r!==undefined?(r===1&&i===2&&(r=2),u=new n(t,r)):u=n._parseViaBrowser(t),u},n.prototype.toPacked=function(){return((this.alpha*255&255)<<24>>>0)+((this.red&255)<<16)+((this.green&255)<<8)+(this.blue&255)},n.prototype.toRgba=function(){return this.alpha<1?"rgba("+this.red+","+this.green+","+this.blue+","+k.roundToInterval(this.alpha,.01)+")":"rgb("+this.red+","+this.green+","+this.blue+")"},n._getColorFormat=function(t){var i;return t=t||"",t[0]!=="#"||t.length!==7&&t.length!==9||isNaN(parseInt(t.slice(1),16))?t.match(n.rgbRegex)&&(i=0):i=1,i},n._parseViaBrowser=function(t){var u,i,r;return t&&(i=document.createElement("div"),r=document.body,i.style.display="none",i.style.color=t,i.style.color&&(r.appendChild(i),t=getComputedStyle(i).color,r.removeChild(i),t&&t.match(n.rgbRegex)&&(u=new n(t,0)))),u},n.prototype._parseHex=function(n,t){var i=parseInt(n.slice(1),16);n.length===9?t===2?this.alpha=(i>>24&255)/255:(this.alpha=(i&255)/255,i=i>>8):this.alpha=1;this.red=i>>16&255;this.green=i>>8&255;this.blue=i&255;r.assert(!isNaN(this.red),"red color is not as expected");r.assert(!isNaN(this.green),"green color is not as expected");r.assert(!isNaN(this.blue),"blue color is not as expected")},n.prototype._parseRgba=function(t){var i=t&&t.match&&t.match(n.rgbRegex);i&&i.length>4&&this._populateColorComponents(i.slice(1))},n.prototype._populateColorComponents=function(n){n&&n.length>=3&&(this.red=parseInt(n[0]),r.assert(!isNaN(this.red),"red color is not as expected"),this.green=parseInt(n[1]),r.assert(!isNaN(this.green),"green color is not as expected"),this.blue=parseInt(n[2]),r.assert(!isNaN(this.blue),"blue color is not as expected"),n.length>3&&n[3]!==undefined?(this.alpha=parseFloat(n[3]),r.assert(!isNaN(this.alpha),"alpha color is not as expected")):this.alpha=1)},n.prototype._unpackColor=function(n){var t=parseInt(n);this.red=t>>16&255;this.green=t>>8&255;this.blue=t&255;this.alpha=k.roundToInterval((t>>24&255)/255,.01)},n.transparent="rgba(255, 255, 255, 0.0)",n.white="rgb(255, 255, 255)",n.black="rgb(0, 0, 0)",n.rgbRegex=/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/,n}(),tu=function(){function n(n,t,i,r){this.x=n;this.y=t;this.z=i;this.w=r}return n}(),gi=function(){function n(){this._curveX=new at;this._curveY=new at;this._curveZ=new at;this._curveW=new at}return n.prototype.addKey=function(n,t,i,r,u,f){this._curveX.addKey(new lt(n,t,f));this._curveY.addKey(new lt(n,i,f));this._curveZ.addKey(new lt(n,r,f));this._curveW.addKey(new lt(n,u,f))},n.prototype.computeTangents=function(){this._curveX.computeTangents();this._curveY.computeTangents();this._curveZ.computeTangents();this._curveW.computeTangents()},n.prototype.evaluateCurve=function(n){return new tu(this._curveX.evaluate(n),this._curveY.evaluate(n),this._curveZ.evaluate(n),this._curveW.evaluate(n))},n}(),iu=function(n){function t(){return n.call(this)||this}return p(t,n),t.prototype.addKey=function(t,i,r,u,f,e){var l=i/255,h=r/255,c=u/255,p=f,a=0,y=0,v=0,o=Math.max(c,Math.max(l,h)),s=Math.min(c,Math.min(l,h));o===s?a=0:o===l&&h>=c?a=60*((h-c)/(o-s)):o===l&&h.5&&(y=(o-s)/(2-2*v));n.prototype.addKey.call(this,t,a/360,et.clamp(y,0,1),et.clamp(v,0,1),et.clamp(p,0,1),e)},t.prototype.evaluate=function(t){var i=n.prototype.evaluateCurve.call(this,t);return et.hslaTorgba(i.x,i.y,i.z,i.w)},t.prototype.evaluateHsla=function(t){return n.prototype.evaluateCurve.call(this,t)},t}(gi),et=function(){function n(){}return n.getComponent=function(n,t,i){return n<1/6?t+(i-t)*6*n:n<.5?i:n<2/3?t+(i-t)*6*(2/3-n):t},n.normalize=function(n){return n<0&&(n+=1),n>1&&(n-=1),n},n.clamp=function(n,t,i){return ni?i:n},n.applyHslaTransform=function(t,i){var r=t.x+i.x;r>1&&(r-=1);var u=n.clamp(t.y+i.y,0,1),f=n.clamp(t.z+i.z,0,1),e=n.clamp(t.w+i.w,0,1);return{x:r,y:u,z:f,w:e}},n.hslaTorgba=function(t,i,r,u){var f=r<.5?r*(1+i):r+i-r*i;var e=2*r-f,o=n.getComponent(n.normalize(t+1/3),e,f),s=n.getComponent(n.normalize(t),e,f),h=n.getComponent(n.normalize(t-1/3),e,f);return new ft([n.clamp(Math.round(o*255),0,255),n.clamp(Math.round(s*255),0,255),n.clamp(Math.round(h*255),0,255),n.clamp(u,0,1)])},n.convertPackedTorgba=function(n){var t=new ft(n,3);return t.toRgba()},n}(),ru=function(){function n(n,t,i){this.start=n;this.end=t;this.value=i}return n}(),uu=function(){function n(){this._ranges=[]}return n.prototype.addRange=function(n,t,i){this._ranges.push(new ru(n,t,i))},n.prototype.evaluate=function(n){for(var i,t=0;t=n)return i.value;return null},n.prototype.hasValueAt=function(n){for(var i,t=0;t=n)return!0;return!1},n.prototype.getHasValue=function(){return this._ranges.length>0},n}(),nr=function(){function n(n,t,i,r,u,f){this._values=[n,t,i,r,u,f]}return n.prototype.invert=function(){var i=this._values,r=i[0],u=i[1],f=i[2],e=i[3],o=i[4],s=i[5],t=r*e-u*f;if(t===0)throw new Error("Determinant is zero");return new n(e/t,-u/t,-f/t,r/t,(f*s-e*o)/t,(u*o-r*s)/t)},n.prototype.multiply=function(t){var i=this._values,r=i[0],u=i[1],f=i[2],e=i[3],v=i[4],y=i[5];i=t.getValues();var o=i[0],s=i[1],h=i[2],c=i[3],l=i[4],a=i[5];return new n(r*o+f*s,u*o+e*s,r*h+f*c,u*h+e*c,v+r*l+f*a,y+u*l+e*a)},n.prototype.transform=function(n){return new h(this.projectX(n.x,n.y),this.projectY(n.x,n.y))},n.prototype.projectX=function(n,t){var i=this._values;return n*i[0]+t*i[2]+i[4]},n.prototype.projectY=function(n,t){var i=this._values;return n*i[1]+t*i[3]+i[5]},n.prototype.scale=function(t,i){var r=this._values;return new n(r[0]*t,r[1]*i,r[2]*t,r[3]*i,r[4]*t,r[5]*i)},n.prototype.translate=function(t,i){var r=this._values;return new n(r[0],r[1],r[2],r[3],r[4]+t,r[5]+i)},n.prototype.rotate=function(t){if(t===0)return this;var i=this._values,r=Math.cos(t),u=Math.sin(t),f=i[0],e=i[2],o=i[4],s=f*r-i[1]*u,h=f*u+i[1]*r,c=e*r-i[3]*u,l=e*u+i[3]*r,a=o*r-i[5]*u,v=o*u+i[5]*r;return new n(s,h,c,l,a,v)},n.prototype.getValues=function(){var n=this._values;return[n[0],n[1],n[2],n[3],n[4],n[5]]},n.prototype.equals=function(n){var i=n&&n.getValues(),t;if(i&&i.length===6){for(t=0;t<6;t++)if(this._values[t]!==i[t])return!1;return!0}return!1},n.prototype.nearlyEquals=function(n,t){var r=n&&n.getValues(),i;if(r&&r.length===6){for(i=0;i<6;i++)if(Math.abs(this._values[i]-r[i])>t)return!1;return!0}return!1},n.prototype.getZoomDirection=function(){var n=this.getValues();return n[0]<.9999||n[3]<.9999?-1:n[0]>1.0001||n[3]>1.0001?1:0},n.identity=new n(1,0,0,1,0,0),n}(),tt=function(){function n(n,i){i===void 0&&(i=!0);this.revision=0;this._allowDuplicates=i;this.changed=new t;n&&Array.prototype.push.apply(this,n)}return n.prototype._invokeChanged=function(n,t,i,r,u){this.revision++;this.changed&&this.changed.invoke({addedIndex:n,added:t,removedIndex:i,removed:r,reset:u===!0})},n.prototype.insert=function(n,t){this._allowDuplicates||this.indexOf(n)===-1?this.insertAll([n],t):(this.remove(n),this.insert(n,t))},n.prototype.insertAll=function(n,t){var r,i,u;if(n&&n.length){if((typeof t!="number"||t<0||t>=this.length)&&(t=this.length),r=[],this._allowDuplicates)r=n;else for(i=0;i0&&(u=[t,0],u=u.concat(r),Array.prototype.splice.apply(this,u),this._invokeChanged(t,r,null,null))}},n.prototype.remove=function(n){this.removeAt(this.indexOf(n))},n.prototype.removeAt=function(n,t){if(t===void 0&&(t=1),n>=0&&t>=1&&n+t<=this.length){var i=Array.prototype.splice.call(this,n,t);this._invokeChanged(null,null,n,i,this.length===0)}},n.prototype.clear=function(){var n=Array.prototype.splice.call(this,0,this.length);this._invokeChanged(null,null,0,n,!0)},n.prototype.indexOf=function(n,t){return t===void 0&&(t=0),Array.prototype.indexOf.call(this,n,t)},n.prototype.lastIndexOf=function(n,t){return t===void 0&&(t=this.length),Array.prototype.lastIndexOf.call(this,n,t)},n.prototype.slice=function(n,t){return n===void 0&&(n=0),t===void 0&&(t=this.length),Array.prototype.slice.call(this,n,t)},n.prototype.setValue=function(n,t){if(!(n<0)){var i=this[n];this[n]=t;this.length=Math.max(this.length,n+1);this._invokeChanged(n,[t],n,[i])}},n.prototype.find=function(n){for(var i,t=0;tr.max||i.max0?this.minPoint.equals(n.minPoint,t)&&this.maxPoint.equals(n.maxPoint,t):this.minPoint.equals(n.minPoint)&&this.maxPoint.equals(n.maxPoint)}return!1},n.prototype.getCorners=function(){r.assert(!this.isEmpty(),"Calling rect.corners on an empty rect is a coding error");var n=this.minPoint.x,t=this.maxPoint.x,i=this.minPoint.y,u=this.maxPoint.y;return[new h(n,i),new h(t,i),new h(t,u),new h(n,u)]},n.prototype.getSize=function(){return this.isEmpty()?new b(0,0):new b(this.maxPoint.x-this.minPoint.x,this.maxPoint.y-this.minPoint.y)},n.prototype.getCenter=function(){return this.isEmpty()?null:{x:(this.minPoint.x+this.maxPoint.x)/2,y:(this.minPoint.y+this.maxPoint.y)/2}},n.prototype.buffer=function(n,t){r.assert(!this.isEmpty(),"Calling rect.buffer on an empty rect is a coding error");this.minPoint.x=this.minPoint.x-n;this.minPoint.y=this.minPoint.y-t;this.maxPoint.x=this.maxPoint.x+n;this.maxPoint.y=this.maxPoint.y+t;var i;this.minPoint.x>this.maxPoint.x&&(i=this.minPoint.x,this.minPoint.x=this.maxPoint.x,this.maxPoint.x=i);this.minPoint.y>this.maxPoint.y&&(i=this.minPoint.y,this.minPoint.y=this.maxPoint.y,this.maxPoint.y=i)},n.prototype.intersect=function(n){return this.intersects(n)?(this.minPoint=new h(Math.max(this.minPoint.x,n.minPoint.x),Math.max(this.minPoint.y,n.minPoint.y)),this.maxPoint=new h(Math.min(this.maxPoint.x,n.maxPoint.x),Math.min(this.maxPoint.y,n.maxPoint.y))):this.minPoint=this.maxPoint=null,this},n.prototype.intersects=function(n){return!this.isEmpty()&&!n.isEmpty()&&this.minPoint.x<=n.maxPoint.x&&this.minPoint.y<=n.maxPoint.y&&this.maxPoint.x>=n.minPoint.x&&this.maxPoint.y>=n.minPoint.y},n.prototype.isEmpty=function(){return!this.minPoint||!this.maxPoint},n.prototype.isInside=function(n){return!this.isEmpty()&&!n.isEmpty()&&this.minPoint.x>=n.minPoint.x&&this.minPoint.y>=n.minPoint.y&&this.maxPoint.x<=n.maxPoint.x&&this.maxPoint.y<=n.maxPoint.y},n.prototype.pointInRect=function(n){return!this.isEmpty()&&n.x>=this.minPoint.x&&n.x<=this.maxPoint.x&&n.y>=this.minPoint.y&&n.y<=this.maxPoint.y},n.prototype.rotate=function(n){return r.assert(!this.isEmpty(),"Calling rect.rotate on an empty rect is a coding error"),new tr(this,n)},n.prototype.union=function(n){return n.isEmpty()||(this.isEmpty()?(this.minPoint=n.minPoint.clone(),this.maxPoint=n.maxPoint.clone()):(this.minPoint.x=Math.min(this.minPoint.x,n.minPoint.x),this.minPoint.y=Math.min(this.minPoint.y,n.minPoint.y),this.maxPoint.x=Math.max(this.maxPoint.x,n.maxPoint.x),this.maxPoint.y=Math.max(this.maxPoint.y,n.maxPoint.y))),this},n.prototype.unionPoint=function(n){return this.isEmpty()?(this.minPoint=n.clone(),this.maxPoint=n.clone()):(this.minPoint.x=Math.min(this.minPoint.x,n.x),this.minPoint.y=Math.min(this.minPoint.y,n.y),this.maxPoint.x=Math.max(this.maxPoint.x,n.x),this.maxPoint.y=Math.max(this.maxPoint.y,n.y)),this},n}(),c;(function(n){function i(n,t,i,r){var e=i-n,u,f;return e!==0?(u=(r-t)/(i-n),f=t-u*n,[u,f]):null}function r(t){return t*n.radiansPerDegree}function u(t){return t*n.degreesPerRadian}function f(t){while(t<0)t+=n.twoPI;while(t>=n.twoPI)t-=n.twoPI;return t}function e(n){return(360+n)%360}function o(t){return Math.log(t)/n.loge2}function s(n,t,i){var r=Math.cos(i),u=Math.sin(i);return new h(n*r-t*u,n*u+t*r)}function c(n,t){var i=Math.sin(n)*t,r=Math.cos(n)*t;return new h(i,r)}function l(n,t){var i=n*Math.cos(t),r=n*Math.sin(t);return new h(i,r)}function a(n){return Math.atan2(n.y,n.x)}function v(n,t){return Math.atan2(t.y-n.y,t.x-n.x)}function y(n){return Math.sqrt(n.x*n.x+n.y*n.y)}function p(n,t){var i=(n.x+t.x)/2,r=(n.y+t.y)/2;return new h(i,r)}function w(n,t){var i=n.x+t.x,r=n.y+t.y;return new h(i,r)}function b(n,t){var i=n.x-t.x,r=n.y-t.y;return new h(i,r)}function k(n,t){var i=t.x-n.x,r=t.y-n.y;return Math.sqrt(i*i+r*r)}function d(n,t,i){var u=i.x-t.x,f=i.y-t.y,s=u*u+f*f,r=((n.x-t.x)*u+(n.y-t.y)*f)/s;r>1?r=1:r<0&&(r=0);var h=t.x+r*u,c=t.y+r*f,e=h-n.x,o=c-n.y;return Math.sqrt(e*e+o*o)}function g(n,t){return t===0?n:t===n?0:n-Math.floor(n/t)*t}function nt(n,t){return n.x*t.x+n.y*t.y}function tt(n,t){return n.x*t.y-n.y*t.x}function it(t){var i=n.getMagnitudeOfVector2D(t),r=t.x,u=t.y;return i!==0&&(r/=i,u/=i),new h(r,u)}function rt(t,i){for(var r,u=Number.MAX_VALUE,f=-u,e=0,o=i.length;ef&&(f=r);return{min:u,max:f}}function ut(n,t,i){if(i<=t)throw new Error("invalid argument exception");for(var r=i-t;ni)n-=r;return n}function ft(t){return(t-1)/(n.MAX_ZOOM_LEVEL-1)}function et(t){return t*(n.MAX_ZOOM_LEVEL-1)+1}function ot(n){var t,i,r;if(n&&n.length>0){var u=n[0].x,e=u,f=n[0].y,o=f;for(t=1;te&&(e=i),ro&&(o=r);return new gt(new h(u,f),new h(e,o))}return null}function st(t,i,r){if(!t||!i||!r||h.pointsEqual(t,i)||h.pointsEqual(t,r))return NaN;var u=n.getAngleOfSegment2D(t,i),f=n.getAngleOfSegment2D(t,r);return f-u}function ht(n,t,i,r){var f=i||180,e=r||360,u=Math.abs(n-t);return u>f&&(u=Math.abs(Math.min(n,t)+e-Math.max(n,t))),u}function ct(t,i){return n.getAngleDifference(t,i,Math.PI,n.twoPI)}function lt(n,t,i){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))0?1:u<0?2:0):r=-1,r}function yt(n){var i,r,t;if(!n||n.length<=2)return-1;for(i=0,r=n[n.length-1],t=0;t0?1:2}function pt(n,i,r,u,f){var e;if(n&&i&&r&&u){var o=i.y-n.y,s=n.x-i.x,c=u.y-r.y,l=r.x-u.x,a=o*l-c*s;if(a===0)e=null;else{var p=o*n.x+s*n.y,w=c*r.x+l*r.y,v=(l*p-s*w)/a,y=(o*w-c*p)/a;e=!f||t(v,n.x,i.x)&&t(y,n.y,i.y)&&t(v,r.x,u.x)&&t(y,r.y,u.y)?new h(v,y):null}}else e=null;return e}function wt(n){return new h(-n.y,n.x,n.z)}function bt(i,r,u,f,e){var c=[],a;if(i&&r&&u&&f>0){if(!e&&n.pointInCircle(i,u,f)&&n.pointInCircle(r,u,f))return c;if(a=n.trySolve(i.x,i.y,r.x,r.y),a){var l=a[0],v=a[1],p=f*f,y=v-u.y,w=l*l+1,b=-2*u.x+2*y*l,k=u.x*u.x+y*y-p,o=dt(w,b,k),s;o.length>0&&(s=o[0]*l+v,(e||t(o[0],i.x,r.x)&&t(s,i.y,r.y))&&c.push(new h(o[0],s)));o.length>1&&(s=o[1]*l+v,(e||t(o[1],i.x,r.x)&&t(s,i.y,r.y))&&c.push(new h(o[1],s)))}else c=ni(i.x,i.y,r.y,u,f,e)}return c}function kt(n){for(var i=0,t=n.length,r;t-->0;)r=n[t]+i,n[t]=r,i=n[t]}function dt(n,t,i){var r=[],u=t*t-4*n*i,o=n*2,f=-t/o,e;return u>0?(e=Math.sqrt(u)/o,r.push(f+e),r.push(f-e)):u===0&&r.push(f),r}function ni(n,i,r,u,f,e){var o=[],s=Math.abs(n-u.x),c=u.y;if(s0&&u>0||r<0&&u<0||r===0||u===0}n.degreesPerRadian=180/Math.PI;n.radiansPerDegree=Math.PI/180;n.loge2=Math.log(2);n.twoPI=Math.PI*2;n.thirtyDegreesInRadians=Math.PI/6;n.MAX_ZOOM_LEVEL=23;n.zoomDeltaBetweenLods=1/(n.MAX_ZOOM_LEVEL-1);n.markupVisible=0;n.markupInvisible=255;n.trySolve=i;n.degreesToRadians=r;n.radiansToDegrees=u;n.normalizeRadian=f;n.normalizeDegrees=e;n.log2=o;n.rotatePoint=s;n.getPointFromAngleAndRadius=c;n.getVector2DFromMagnitudeAndDirection=l;n.getAngleOfVector2D=a;n.getAngleOfSegment2D=v;n.getMagnitudeOfVector2D=y;n.getMidpoint2D=p;n.getVectorSum2D=w;n.getVectorDifference2D=b;n.getEuclideanDistance2D=k;n.getDistanceFromPointToVector=d;n.mod=g;n.dotProduct2D=nt;n.crossProduct2D=tt;n.normalizeVector2D=it;n.projectOntoAxis=rt;n.wrap=ut;n.calculateStyleScaleForLod=ft;n.calculateZoomforStyleScale=et;n.computeBoundingBox=ot;n.getAngleBetween=st;n.getAngleDifference=ht;n.getAngleDifferenceInRadians=ct;n.pointInCircle=lt;n.matrixMultiply=at;n.rotatingDirection=vt;n.polygonRotatingDirection=yt;n.intersect2D=pt;n.perpendicular2D=wt;n.intersectLineCircle=bt;n.deltaDecode=kt})(c||(c={}));var k=function(){function n(){}return n.greatCircleDistance=function(t,i){var r=c.degreesToRadians(i.latitude),u=c.degreesToRadians(t.latitude),o=c.degreesToRadians(i.longitude),s=c.degreesToRadians(t.longitude),h=Math.abs(r-u),l=Math.abs(o-s),f=Math.sin(h/2),e=Math.sin(l/2),a=2*Math.asin(Math.sqrt(f*f+Math.cos(u)*Math.cos(r)*e*e));return n.earthRadiusMajorAxis*a},n.getMapLocationFromLocationHeadingAndDistance=function(t,i,r){if(!t||typeof i=="undefined"||i===null||typeof r=="undefined"||r===null)throw new Error("location, headingInRadians and distanceInMeters must all be defined.");var u=r/n.earthRadiusMajorAxis,f=c.degreesToRadians(t.latitude),s=c.degreesToRadians(t.longitude),o=Math.asin(Math.sin(f)*Math.cos(u)+Math.cos(f)*Math.sin(u)*Math.cos(i)),h=s+Math.atan2(Math.sin(i)*Math.sin(u)*Math.cos(f),Math.cos(u)-Math.sin(f)*Math.sin(o));return new e(c.radiansToDegrees(o),e.normalizeLongitude(c.radiansToDegrees(h)))},n.isValidNumber=function(n){return typeof n=="number"&&isFinite(n)},n.isValidAltitudeReference=function(n){return n===-1||n===0},n.metersToDegrees=function(t){var i=t/n._metersPerMile,r=Math.PI/10800*i;return c.radiansToDegrees(r)},n.latitudeDegreesToMeters=function(n){return Math.sin(c.degreesToRadians(n))*this.earthRadiusMajorAxis},n.longitudeDegreesToMeters=function(n){return c.degreesToRadians(n)*this.earthRadiusMajorAxis},n.metersToLatitudeDegrees=function(n){return c.radiansToDegrees(Math.asin(n/this.earthRadiusMajorAxis))},n.metersToLongitudeDegrees=function(n){return c.radiansToDegrees(n/this.earthRadiusMajorAxis)},n.getAngleBetweenTwoLocations=function(n,t){return c.radiansToDegrees(c.normalizeRadian(Math.atan2(e.normalizeLongitude(t.longitude-n.longitude),t.latitude-n.latitude)))},n.roundToInterval=function(n,t){if(t){var i=1/t;n=Math.round(n*i)/i}return n},n.getMetersPerDegreeOfLatitude=function(n){var t=n*Math.PI/180;return 111132.92+-559.82*Math.cos(2*t)+1.175*Math.cos(4*t)+-.0023*Math.cos(6*t)},n.getMetersPerDegreeOfLongitude=function(n){var t=n*Math.PI/180;return 111412.84*Math.cos(t)+-93.5*Math.cos(3*t)+.118*Math.cos(5*t)},n.earthRadiusMajorAxis=6378137,n.earthRadiusMinorAxis=6356752.314245,n.earthCircumference=2*Math.PI*n.earthRadiusMajorAxis,n.metersPerLongtitudeDegree=111319.4908,n._metersPerMile=1852,n}(),e=function(){function n(n,t,i,r){var u=typeof n!="number"?parseFloat(n):n,f;if(isNaN(u)||u<-90||u>90)throw Error("Invalid latitude");if(this.latitude=u,f=typeof t!="number"?parseFloat(t):t,isNaN(f))throw Error("Invalid longitude");this.longitude=f;this.altitude=i||0;this.altitudeReference=k.isValidAltitudeReference(r)?r:-1}return n.prototype.clone=function(){return n.cloneFrom(this)},n.cloneFrom=function(t){return new n(t.latitude,t.longitude,t.altitude,t.altitudeReference)},n.prototype.toString=function(){return"[MapLocation ("+this.latitude+", "+this.longitude+")]"},n.normalizeLongitude=function(n){return n<-180||n>180?n-Math.floor((n+180)/360)*360:n},n.areEqual=function(n,t,i,r){return r=r||0,n&&t&&Math.abs(n.latitude-t.latitude)<=r&&Math.abs(n.longitude-t.longitude)<=r&&(i||n.altitudeReference===-1&&t.altitudeReference===-1||n.altitudeReference===t.altitudeReference&&Math.abs(n.altitude-t.altitude)<=r)},n.parseLatLong=function(t){var i,r,u;return t&&(i=t.split(","),i.length===2&&(r=parseFloat(i[0]),u=parseFloat(i[1]),isFinite(r)&&isFinite(u)))?new n(r,u):null},n}(),ir=function(){function r(i,r){r===void 0&&(r=1e3);this._interval=r;this._elements=i;this._window=n(window);this.resize=new t;this.startMonitoring()}return r.prototype.getSize=function(){var n=this._elements[0];return new b(n.offsetWidth,n.offsetHeight)},r.prototype.getSizes=function(){var n=[];return this._elements.for_each(function(t){return n.push(new b(t.offsetWidth,t.offsetHeight))}),n},r.prototype.startMonitoring=function(n){var t=this;n&&(this._lastSizes=this.getSizes());this._pollSizeHandler||(this._pollSizeHandler=function(){return t.pollSize()},i.useResizeObserver&&typeof ResizeObserver!="undefined"?(this._resizeObserver=new ResizeObserver(this._pollSizeHandler),this._elements.for_each(function(n){t._resizeObserver.observe(n)})):(!this._intervalId&&this._interval>0&&(this._intervalId=Microsoft.Maps.setInterval(this._pollSizeHandler,this._interval)),this._window.add_event("resize",this._pollSizeHandler)))},r.prototype.stopMonitoring=function(){this._pollSizeHandler&&(this._window.remove_event("resize",this._pollSizeHandler),this._pollSizeHandler=null);this._resizeObserver&&this._resizeObserver.disconnect();this._intervalId&&(window.clearInterval(this._intervalId),this._intervalId=null)},r.prototype.dispose=function(){this.stopMonitoring();this._elements&&this._elements.clear();this._window&&this._window.clear()},r.prototype.pollSize=function(){var i=this._lastSizes,t=this.getSizes(),r=!1,n,u;if(i&&i.length==t.length){for(n=0,u=i.length;n0||i[n].height!==t[n].height&&t[n].height>0){r=!0;break}}else r=!0;r&&(this._lastSizes=t,this.resize.invoke(t))},r}(),ei=function(){function n(n){this._activator=n}return n.prototype.getObjectAsync=function(n){var t=this;this._isObjectLoaded?n(this._object):this._workCallbacks?this._workCallbacks.push(n):(this._workCallbacks=[n],this._activator(function(n){return t._onObjectLoaded(n)}))},n.prototype._onObjectLoaded=function(n){this._object=n;for(var t=0;t180&&(f=1},n.prototype.isBaseLayer=function(n){return this._baseLayers&&this._baseLayers.indexOf(n)!==-1},n.prototype.setBaseLayers=function(n){var t=this;this._baseLayersChangeHandler&&this._baseLayersChangeHandler.dispose();this._baseLayers=n;this._onLayersChanged({reset:!0});this._baseLayersChangeHandler=this._baseLayers&&this._baseLayers.changed.add(function(n){return t._onLayersChanged(n,!1)})},n.prototype.dispose=function(){this._baseLayersChangeHandler&&this._baseLayersChangeHandler.dispose();this._userLayerZIndexChangedEventHandlers&&this._userLayersChangeHandler.dispose();f._clearDisposables(this._userLayerZIndexChangedEventHandlers);f._disposeEvents(this);f._nullifyClass(this)},n.prototype._onLayersChanged=function(n,t){var h=this,e=t&&this._baseLayers?this._baseLayers.length:0,f,i,u,o,s;if(n.reset){if(Array.prototype.splice.call(this,0,this.length),this._baseLayers)for(i=0,u=this._baseLayers.length;i0)switch(u){case 1:n=i(n,t);break;case 2:n=n;break;default:r.assert(!1,"Invalid ClippingMode")}return n}function i(n,t){for(var a=[],d={},o=w.fromRegionId(t).splitByInternationalDateLine(),v=[],y=[],p=[],b=[],s,e,c,h,i,f,l,k,r=0;r3){var ut=f[0],ft=f[1],et=f[2],ot=f[3],st=gt.fromSides(ot,ft,ut,et),g=!1;for(i=0;i=this._goal},n}(),lu=function(){function n(){this._dataLoadedGoalCounter=new oi;this._primitivesRenderedGoalCounter=new oi;this._labelsRenderedGoalCounter=new oi}return n.prototype.setLayerCount=function(n){this._dataLoadedGoalCounter.setGoal(n);this._primitivesRenderedGoalCounter.setGoal(n);this._labelsRenderedGoalCounter.setGoal(n)},n.prototype.resetEventCounts=function(){this._dataLoadedGoalCounter.resetCount();this._primitivesRenderedGoalCounter.resetCount();this._labelsRenderedGoalCounter.resetCount()},n.prototype.incrementDataLoadedCount=function(){this._dataLoadedGoalCounter.incrementCount()},n.prototype.incrementPrimitivesRenderedCount=function(){this._primitivesRenderedGoalCounter.incrementCount()},n.prototype.incrementLabelsRenderedCount=function(){this._labelsRenderedGoalCounter.incrementCount()},n.prototype.haveAllLayersLoadedData=function(){return this._dataLoadedGoalCounter.hasReachedGoal()},n.prototype.haveAllLayersRenderedPrimitives=function(){return this._primitivesRenderedGoalCounter.hasReachedGoal()},n.prototype.haveAllLayersRenderedLabels=function(){return this._labelsRenderedGoalCounter.hasReachedGoal()},n.prototype.haveAllLayersCompleted=function(){return this.haveAllLayersLoadedData()&&this.haveAllLayersRenderedPrimitives()&&this.haveAllLayersRenderedLabels()},n}(),or=function(){function n(n,t){var i,u,r;for(this.frame=n,this._layerData=t,this._layerFilters=[],i=0,u=t.length;i0&&(i=" Layers failed to download data: "+t.join(",").replace(/\d+/gi,"***"),e={feature:"MC",action:"ERR",data:{errorMessage:"Frame timed out."+i}},n.logCriticalError(null,e,!0)));this._failFrame(f,5,null)},n.prototype._initGlobalProcessingEvents=function(){if(typeof sj_evt!="undefined"){var n=!0,t=-1,i=function(){n||(t!==-1&&clearTimeout(t),n=!0,sj_evt.fire("MapsProcessingStarted"))};this._disposables.push(this.frameRendered.add(function(){t=Microsoft.Maps.setTimeout(function(){t=-1;n&&(n=!1,sj_evt.fire("MapsProcessingFinished"))},200)},!0));this._disposables.push(this.frameSet.add(i,!0));this._disposables.push(this._map.viewChanging.add(i,!0))}},n.frameZero={frameNumber:0,purpose:2,view:null,viewport:null,lastViewChangeFrameNumber:0,cause:0},n._timeoutDuration=2e4,n}(),au=function(){function n(n,t,i){this._key=n;this._timestamp=t;this._perfManager=i}return n.prototype.end=function(n){this._logged||(this._perfManager.end(this,n),this._logged=!0)},n.prototype.timestamp=function(){return this._timestamp},n.prototype.key=function(){return this._key},n}(),vu=function(n){function t(t){return n.call(this,"Event.ClientPerf",t)||this}return p(t,n),t.prototype.log=function(i,r){i&&r&&n.prototype.logObject.call(this,t.getPerfLogDataObject(i,r))},t.prototype.start=function(n){return n?new au(n,this._getTimestamp(),this):null},t.prototype.end=function(n,i){if(n){var r=n.key(),u=i?r+t.KeySeparator+i:r,f=n.timestamp&&n.timestamp();this._getTimestamp()&&f&&this.logObject(t.getPerfLogDataObject(u,this._getTimestamp().getTime()-n.timestamp().getTime()))}},t.prototype.checkpoint=function(n){n&&this.logObject(t.getPerfLogDataObject(n,this._getTimestamp()))},t.prototype._getTimestamp=function(){return new Date},t.getPerfLogDataObject=function(n,t){return{T:"CI.ClientPerf",FID:"CI",key:n,value:t}},t.KeySeparator=".",t}(InstrumentationBase),y=function(){function n(n,t){this.cameraLocation=n;this.heading=((t||0)%360+360)%360;this.heading=this.heading>315?this.heading-360:this.heading}return n.prototype.clone=function(){var t=new n(this.cameraLocation.clone(),this.heading);return t.pitch=this.pitch,t.verticalFov=this.verticalFov,t},n.areEqual=function(t,i){return t===i?!0:!t||!i?!1:n.areNumbersEqual(t.heading,i.heading)?n.areNumbersEqual(t.pitch,i.pitch)?n.areNumbersEqual(t.verticalFov,i.verticalFov)?e.areEqual(t.cameraLocation,i.cameraLocation)?!0:!1:!1:!1:!1},n.areCameraAltitudesEqual=function(n,t){return n.cameraLocation.altitude===t.cameraLocation.altitude&&n.cameraLocation.altitudeReference===t.cameraLocation.altitudeReference},n.areNumbersEqual=function(n,t){if(n===t)return!0;if(n===undefined||n===null||t===undefined||t===null)return!1;return Math.abs(n-t)<=1e-6},n}(),yu=function(){function n(){}return n.ContextMenu="ContextMenu",n.LocalSearch="LocalSearch",n.LocalListing="LocalListing",n.LocalDetails="LocalDetails",n.SerpLocalListing="SerpLocalListing",n.Collections="Collections",n.MyPlacesNew="MyPlacesNew",n.POI="POI",n.Landmarks="Landmarks",n.SearchBox="SearchBox",n.SearchButton="SearchButton",n.TaskBar="TaskBar",n.Autosuggest="Autosuggest",n.Feedback="Feedback",n.DirectionsWaypointSearch="DirectionsWaypointSearch",n.Trivia="Trivia",n.DirectionsRouteList="DirectionsRouteList",n.TaskCard="TaskCard",n.TransitStop="TransitStop",n.TransitLine="TransitLine",n.NearbyParking="NearbyParking",n.Geochain="Geochain",n.Permalink="Permalink",n.FallbackRequery="FallbackRequery",n.ItineraryListings="ItineraryListings",n.ItineraryDetails="ItineraryDetails",n.ItineraryPOI="ItineraryPOI",n.TravelL2="TravelL2",n.VenueMap="VenueMap",n.SerpAnswer="SerpAnswer",n.ServerPagination="ServerPagination",n.InfiniteScrollPagination="InfiniteScroll",n.Infobox="Infobox",n.MapsTour="MapsTour",n.QuerySwitch="QuerySwitch",n.MobileListMap="MobileListMap",n.LayerManager="LayerManager",n.Nearby="Nearby",n.Sidebar="Sidebar",n.LocalGuide="LocalGuide",n.LocationEdit="LocationEdit",n.TopicSearch="TopicSearch",n.SearchAgainButton="SearchAgainButton",n.FilterChange="FilterChange",n.MapPanZoom="MapPanZoom",n}(),pu=function(){function n(){}return n.Autosuggest="AS",n.Collections="CX",n.Directions="DD",n.Embed="EMB",n.Print="PRT",n.Share="SH",n.MyContributions="MCB",n.Search="SR",n.Streetside="SS",n.Traffic="T",n.LocateMe="LM",n.Feedback="FB",n.TaskManager="TM",n.Tips="TP",n.Fullscreen="FS",n.Overlay="OV",n.BirdseyeV2="B2",n.VenueMap="VM",n.Commutability="CMT",n.LocalGuide="LG",n.Shopping="SHOP",n.Autos="AUTOS",n.Sidebar="SB",n.Flyover="FLO",n.Landmark3D="LMK3D",n.Flywheel="FLW",n.FlywheelViewOnly="FLWVO",n.FlywheelBanner="FLWBN",n.FlywheelBannerViewOnly="FLWBNVO",n.TopicSearch="TS",n.CommuteRewards="COMR",n.MapPageView="MPV",n}(),sr=function(){function n(){}return n.zoomIn="ZoomIn",n.zoomOut="ZoomOut",n}(),d=function(){function n(){}return n.mapZoomActionName="MapZoom",n.mapLayerAdded="MapLayerAdded",n.mapLayerRemoved="MapLayerRemoved",n.mapPanActionName="MapPan",n.mapSetViewActionName="SetView",n.mapTypeChangedActionName="MapTypeChanged",n.mapControlSDKPageNameKey="sdk",n.oneMapOverlayPageNameKey="omo",n.mapControlMsftPageNameKey="msft",n.osMapsFeatureKey="os",n}(),wu=function(){function t(n,t){var r=this,u;this._disposables=[];this._map=n;this._logger=t;(i.enableInstrumentation||i.perfSDKInclusions)&&this._disposables.push(new ui(this._map));u=this._map.getMapOptions().parentPageIG;u&&(i.dynamicProperties.mapsIG=i.dynamicProperties.impressionGuid=u);this._disposables.push(this._map.frameManagerLoaded.addOne(function(){return r._onMapFrameManagerLoaded()}));this._disposables.push(this._map.labelControllerLoaded.add(function(){return r._onMapLabelControllerLoaded()}));this._disposables.push(this._map.mapZoomStarted.add(function(n){return r._onMapZoomStarted(n)}));this._disposables.push(this._map.mapPanStarted.add(function(n){return r._onMapPanStarted(n)}));this._disposables.push(this._map.getAllLayers().changed.add(function(n){return r._onMapLayersChanged(n)}));this._disposables.push(this._map.mapTypeChanged.add(function(n){return r._onMapTypeChanged(n)}));this._mapViewChangingHandler=this._map.viewChanging.add(function(n){return r._onMapViewChanging(n)});this._map.getConfig().enableClientInstrumentationIG&&this._logSnrPageNameForMapControl(i.isSDK?d.mapControlSDKPageNameKey:i.isMsftPartner?d.mapControlMsftPageNameKey:d.oneMapOverlayPageNameKey,!0)}return t.prototype._onMapFrameManagerLoaded=function(){var n=this,t=this._map.getFrameManager();this._disposables.push(t.frameSet.add(function(t){return n._onFrameManagerFrameSet(t)}));this._disposables.push(t.frameRendered.add(function(t){return n._onFrameRendered(t)}))},t.prototype._onMapLabelControllerLoaded=function(){var n=this;this._disposables.push(this._map.getLabelController().instrumentLabelingPass.add(function(t){return n._onInstrumentLabelingPass(t)}))},t.prototype.setMapMode=function(n){if(n.mapModeType===0){var t=this._map.getMapType().id;t===s.ordnanceSurvey&&this._logMapTypeChangedInst(t)}},t.prototype._onInstrumentLabelingPass=function(n){if(n.landmarksCount){var t={feature:"L",action:"A",data:{CT:n.landmarksCount,DCT:n.landmarkDealsCount}};this._logger.logObject(t,null,!0)}},t.prototype._onFrameManagerFrameSet=function(){r.log(null,"Frame set {0}",Date.now());r.logResourceLoadOrder(null,"FrameSet")},t.prototype._onMapLayersChanged=function(n){var t=[],u=!0,i,r;for(n.added?t=n.added:n.removed&&(t=n.removed,u=!1),i=0;ithis._lastZoomLevel?sr.zoomIn:sr.zoomOut),r},t.prototype._logLayerChangedInst=function(n,t){var r=n?d.mapLayerAdded:d.mapLayerRemoved,i=this._createLogData(r);i.data.ID=t;this._logger.logObject(i,null,!1)},t.prototype._logMapTypeChangedInst=function(n){var t=this._createLogData(d.mapTypeChangedActionName),u=i.dynamicProperties,r;t.data.MS=n;this._logger.logObject(t,null,!1);n===s.ordnanceSurvey&&(this._map.getMapOptions().sessionKey||u.sessionKey?this._logSnrPageNameForMapControl(d.osMapsFeatureKey,!1):(r=this._map.getConfig().logServiceUrlFormat.replace(/{credentials}/,pt.instance.getOriginalCredentials()).replace(/{name}/,"imageryOS").replace(/{mkt}/,i.dynamicProperties.market),nt.downloadJsonp(r,"ordnanceSurvey",null,null,null,null,null,3)))},t.prototype._logClientInst=function(n){if(i.enableInstrumentation){var t=n==="A"||n===d.mapSetViewActionName,r=this._createLogData(n);this._logger.logObject(r,null,t)}},t.prototype._createLogData=function(n){var t=this._constructMapInstrumentationData(n);return{feature:"MC",action:n,data:t}},t.prototype._logSnrPageNameForMapControl=function(t,r){var e;if(i.enableInstrumentation||i.enableErrorInstrumentation||i.perfSDKInclusions){var u=i.dynamicProperties,f=this._map.getConfig().serverInstrumentationUrlFormat.replace("{origin}",u.origin).replace("{q}","").replace("{f}",t),o="MONITR";window.location.href.toUpperCase().indexOf(o)>-1&&(f+="&FORM="+o);e=u.sdkCustomerScenarioId;e&&(f+="&sid=".concat(e));nt.downloadGeneric(f,"pagename",function(t){var e,f;r&&(typeof t=="string"&&(e=new DOMParser,t=e.parseFromString(t,"text/html")),typeof t=="object"&&(f=n(t).select("div[id=ImpressionGuid]").get_attr("name"),f&&(u.mapsIG=f,i.isMapsAnswer||(u.impressionGuid=f),ut.igUpdatedPromise.resolve())))},r?"document":null,null,null,3)}},t.prototype.dispose=function(){this._logger&&this._logClientInst("D");f._clearDisposables(this._disposables);this._mapViewChangingHandler.dispose();this._map=null;this._logger=null},t}(),l;(function(n){function o(n,u,e){e===void 0&&(e=t);var o=n.altitude*r;return f(u?0:n.latitude,o/i,e)}function s(i,r,u,f){f===void 0&&(f=t);var o=n.toAltitude(i,r,u,f);return new e(i.latitude,i.longitude,o,0)}function h(n,f,e,o){o===void 0&&(o=t);var s=u(e?0:n.latitude,f,o)*i;return s/r}function l(n,i,r,f){return f===void 0&&(f=t),u(r?0:n.latitude,i,f)}function a(n,i,r,u){return u===void 0&&(u=t),f(r?0:n.latitude,i,u)}function u(n,t,i){return Math.cos(c.degreesToRadians(n))*k.earthCircumference/(i*Math.pow(2,t))}function f(n,t,i){return c.log2(Math.cos(c.degreesToRadians(n))*k.earthCircumference/(i*t))}var t=256,i=500,r=Math.tan(c.degreesToRadians(25));n.fromLocation=o;n.toLocation=s;n.toAltitude=h;n.toScale=l;n.fromScale=a})(l||(l={}));var bu=function(){function n(n,t,i,r,u,f,e){this.priority=n;this._scene=t;this._minHeading=i||0;this._maxHeading=r||0;this._minScale=u||l.toScale(null,23,!0);this._maxScale=f||l.toScale(null,1,!0);this._bounds=e}return n.prototype.getSceneBounds=function(){return this._bounds},n.prototype.getScene=function(n,t,i,r){var u;return n?n===this._scene.crs&&(!this._bounds||this._isIntersecting(this._bounds,t))&&r>=this._minHeading&&r<=this._maxHeading&&(i>=this._minScale||n.sceneMetadata)&&i<=this._maxScale&&(u=this._scene):(!this._bounds||this._isIntersecting(this._bounds,t))&&r>=this._minHeading&&r<=this._maxHeading&&i>=this._minScale&&i<=this._maxScale&&(u=this._scene),u},n.prototype.dispose=function(){this._scene&&this._scene.dispose();this._bounds=null},n.prototype._isIntersecting=function(n,t){return t instanceof e?n.contains(t):n.intersects(t)},n}(),ot=function(n){function r(r,u,e,o,s,h,c,l,a,v){c===void 0&&(c=18e5);a===void 0&&(a=!1);v===void 0&&(v="");var y=n.call(this,r,u,e,o,s,a,v)||this;return y._minCriticalDataLoadedPercentage=80,y._networkPriority=h,y._sceneContributors=[],y._pendingCriticalDataLoadedResolves=[],y._cacheDuration=c,y.setRenderTarget(0),y._rasterTiles=[],y._disposables.push(y.tileDownloaded=new t),y._disposables.push(y.dataLoaded=new t),y._disposables.push(y.crsReady=new t),y._disposables.push(y.dataLoadFailed=new t),y._disposables.push(y.layerInvalidated=new t),l===undefined&&(l=(i.isMapsVertical||i.isMapsAnswer)&&!f._isFeatureEnabled("disableImageCORS")),y._enableCORS=l,y}return p(r,n),r.prototype.addScene=function(n,t,i,r,u,f,e){var o=this;this._disposables.push(t.tileUrlTemplateChanged.add(function(n){o._currentScene===n&&(o._lastViewChangeFrameNumber=-1,o.layerInvalidated.invoke({layerId:o.getId()}))}));this.addSceneContributor(new bu(n,t,i,r,u,f,e))},r.prototype.addSceneContributor=function(n){this._sceneContributors.push(n);this._sceneContributors.sort(function(n,t){return t.priority-n.priority})},r.prototype.getScene=function(n,t,i,r){var u,o,e,f;for(this._currentSceneContributer=null,u=0,o=this._sceneContributors.length;un._minCriticalDataLoadedPercentage?t(i):n._pendingCriticalDataLoadedResolves.push(t)}else n._pendingCriticalDataLoadedResolves.push(t)})},r.prototype.dispose=function(){f._clearDisposables(this._sceneContributors);this._pendingCriticalDataLoadedResolves=[];this._rasterTiles=null;n.prototype.dispose.call(this)},r.prototype._raiseEventsOnDataLoad=function(){var n=this._currentScene?this._currentScene.getPercentCompleted():100,t=this._currentScene?this._currentScene.getPercentFailed():0;n>this._minCriticalDataLoadedPercentage&&(this._pendingCriticalDataLoadedResolves.forEach(function(t){t(n)}),this._pendingCriticalDataLoadedResolves=[]);n===100&&(t===100?this.dataLoadFailed.invoke():this.dataLoaded.invoke({frame:this._currentFrame}))},r.prototype.getAllTilesForAnimation=function(n,t,i,r){this._currentScene.getAllTiles(n,[t],r,this.isCritical,!0,!1,i,this._coreMap.getDpiScale(),this._coreMap.getMapOptions().liteMode,this._networkPriority,this._enableCORS,this._useCredentialsForCORS,this._downloadTimeoutInMS)},r.prototype.refreshBackgroundTiles=function(n,t){this._currentScene.getAllTiles(n,t,null,this.isCritical,!1,!0,!0,this._coreMap.getDpiScale(),this._coreMap.getMapOptions().liteMode,this._networkPriority,this._enableCORS,this._useCredentialsForCORS,this._downloadTimeoutInMS)},r.prototype._getAllTiles=function(n){var t=this,i;this._lastViewChangeFrameNumber===n.lastViewChangeFrameNumber&&(this._currentCrs=this._currentScene.crs,this.crsReady.invoke({frame:n}),i=this._currentScene.getAllTiles(this._currentFrame.viewport,[this._currentFrame.view],function(n){n&&(t.tileDownloaded.invoke(n),t._rasterTiles.push(n));t._raiseEventsOnDataLoad()},this.isCritical,!1,!1,!0,this._coreMap.getDpiScale(),this._coreMap.getMapOptions().liteMode,this._networkPriority,this._enableCORS,this._useCredentialsForCORS,this._downloadTimeoutInMS,-1,this._currentSceneContributer.getSceneBounds()),i===0&&this._raiseEventsOnDataLoad())},r}(fi),hr=function(){function n(t,i,u,f,e,o){var h=this,s;if(r.assertNotNullOrEmpty(i,"fromExpression"),r.assertNotNull(u,"toObj"),r.assertNotNullOrEmpty(f,"toProperty"),o=o||"OneWay",s=i.split("."),this._source=null,this._sourceChangedHandler=null,this._destChangedHandler=null,this._sourceProperty=s[0],this._value=null,this._childBinding=null,this._paused=!1,this._twoWay=!1,this._converter=e,this._toObj=u,this._toProperty=f,this._isIdentity=i===n._identityMarker,s.length>1)s.splice(0,1),this._childBinding=new n(null,s.join("."),u,f,e,o);else if(o==="TwoWay"){if(this._isIdentity)throw new Error("Two-way binding on entire data context is not allowed.");this._twoWay=!0;this._destChangedHandler=this._attachChangeHandler(u,function(){return h._updateSourceFromDest()})}this._setSource(t)}return n.prototype._setSource=function(n){var t=this;this._sourceChangedHandler&&this._sourceChangedHandler.dispose();this._source=n;this._sourceChangedHandler=this._source&&this._attachChangeHandler(this._source,function(){return t._checkForValueChange()});this._checkForValueChange();this._twoWay&&this._updateSourceFromDest()},n.prototype._attachChangeHandler=function(n,t){if(n.changed)return n.changed.add(t);if(n.add_event){n.add_event("change",t);var i=n[0];return i.tagName.toUpperCase()==="INPUT"&&i.type.toUpperCase()==="TEXT"&&n.add_event("keyup",t),{dispose:function(){n.remove_event("change",t);n.remove_event("keyup",t)}}}},n.prototype._checkForValueChange=function(){var n=this._getValue();!this._childBinding&&this._converter&&(n=this._converter(n));n===undefined&&(n=null);a.areEqual(this._value,n)||(this._value=n,this._updateDestination())},n.prototype._getValue=function(){return this._source?this._isIdentity?this._source:a.getValue(this._source,this._sourceProperty):null},n.prototype._updateSourceFromDest=function(){this._source&&(this._paused=!0,a.setValue(this._source,this._sourceProperty,a.getValue(this._toObj,this._toProperty)),this._paused=!1)},n.prototype._updateDestination=function(){this._paused||(this._paused=!0,this._childBinding?this._childBinding._setSource(this._value):a.setValue(this._toObj,this._toProperty,this._value),this._paused=!1)},n.prototype.dispose=function(){this._sourceChangedHandler&&this._sourceChangedHandler.dispose();this._sourceChangedHandler=null;this._source=null;this._childBinding&&this._childBinding.dispose();this._childBinding=null;this._destChangedHandler&&this._destChangedHandler.dispose();this._destChangedHandler=null;this._value=null},n._identityMarker="$self$",n}(),ku=function(){function n(n,t,i){r.assertNotNull(n,"fromObj");r.assertNotNullOrEmpty(t,"fromExpression");r.assertIsFunction(i,"handler");this._eventHandle=null;this._handler=i;this._binding=new hr(n,t,this,"value")}return n.prototype.setValue=function(n){this._eventHandle&&this._eventHandle.dispose();n&&(r.assertInstanceOf(n,t,"jsEvent"),this._eventHandle=n.add(this._handler))},n.prototype.dispose=function(){this._eventHandle&&this._eventHandle.dispose();this._binding&&this._binding.dispose()},n}(),cr=function(n){function t(t,i,r,u){var f=n.call(this,t,u)||this;return f.defineProperty("dataSource",function(n,t){return f._onDataSourceChanged(n,t)}),i&&f.setDataSource(i),r&&f.setTemplateSelector(r),f.dataVersion=0,f}return p(t,n),t.prototype.dispose=function(){n.prototype.dispose.call(this);this._dataSourceInvalidatedHandler&&(this._dataSourceInvalidatedHandler.dispose(),this._dataSourceInvalidatedHandler=null)},t.prototype._onDataSourceChanged=function(n,t){n!==t&&(this._dataSourceInvalidatedHandler&&(this._dataSourceInvalidatedHandler.dispose(),this._dataSourceInvalidatedHandler=null),t&&t.invalidated&&(this._dataSourceInvalidatedHandler=t.invalidated.add(function(){return r.clearTestHooksLog(r.TileLogTag)})))},t}(fi),lr=function(n){function t(t,i,r){var u=this,h,c,f,e,o,l,p,a,s,v,y;for(u=n.call(this)||this,u.id=t.mapType,c=((h=i.mapTypeOptions)===null||h===void 0?void 0:h[t.mapType])||{},u.minZoom=c.minZoom||t.minZoom,u.maxZoom=c.maxZoom||t.maxZoom,f=0,e=Number.MAX_VALUE,o=0,l=t.data;o=360?i=k.earthCircumference:r>180&&(i=k.earthCircumference-i),u=n.pixelWidth,i/u},n.prototype.getGroundResolution=function(n){var t=w.fromRegionId(n),f=t.height,r=t.width,i=k.greatCircleDistance(t.getNorthwest(),t.getSoutheast()),u;return r>=360?i=k.earthCircumference:r>180&&t.getNorth()>0&&t.getSouth()<0&&(i=k.earthCircumference-i),u=Math.sqrt(n.pixelWidth*n.pixelWidth+n.pixelHeight*n.pixelHeight),i/u},n.instance=new n,n}(),w=function(){function n(n,t,i,r){this.center=n;this.width=t;this.height=i;this.crs=st.instance;this.bounds=[this.getNorth(),this.getEast(),this.getSouth(),this.getWest()];this.originalBounds=r&&r.slice()}return n.prototype.buffer=function(n){n===void 0&&(n=.1);this._northWest=this._southEast=null;this.width+=n*this.width;this.height+=n*this.height;this.bounds=[this.getNorth(),this.getEast(),this.getSouth(),this.getWest()]},n.prototype.getNorthwest=function(){return this._northWest||(this._northWest=new e(this.getNorth(),this.getWest(),this.center.altitude)),this._northWest},n.prototype.getSoutheast=function(){return this._southEast||(this._southEast=new e(this.getSouth(),this.getEast(),this.center.altitude)),this._southEast},n.prototype.getNorth=function(){return this.center.latitude+this.height/2},n.prototype.getSouth=function(){return this.center.latitude-this.height/2},n.prototype.getWest=function(){return this.width>=360?-180:e.normalizeLongitude(this.center.longitude-this.width/2)},n.prototype.getEast=function(){return this.width>=360?180:e.normalizeLongitude(this.center.longitude+this.width/2)},n.prototype.toString=function(){return"".concat(this.getNorth(),",").concat(this.getWest(),",").concat(this.getSouth(),",").concat(this.getEast())},n.prototype.clone=function(){return new n(this.center.clone(),this.width,this.height)},n.prototype.containsLatLong=function(n,t){var r=1e-8,u,i;return t=e.normalizeLongitude(t),u=Math.abs(this.center.latitude-n),i=Math.abs(this.center.longitude-t),i>180&&(i=360-i),u<=this.height/2+r&&i<=this.width/2+r},n.prototype.contains=function(n){return this.containsLatLong(n.latitude,n.longitude)},n.prototype.intersects=function(n,t){t===void 0&&(t=0);var r=Math.abs(this.center.latitude-n.center.latitude),i=Math.abs(this.center.longitude-n.center.longitude);return i>180&&(i=360-i),r<=this.height*(1+t)/2+n.height/2&&i<=this.width*(1+t)/2+n.width/2},n.prototype.crossesInternationalDateLine=function(n){var i=this.getEast()360||n&&r===360)),i},n.prototype.splitByInternationalDateLine=function(){var t;if(this.crossesInternationalDateLine()){var i=this.getNorth(),u=this.getWest(),r=this.getSouth(),f=this.getEast(),e=n.fromEdges(i,u,r,180),o=n.fromEdges(i,-180,r,f);t=[e,o]}else t=[this];return t},n.merge=function(t,i){var s=null,o,u,e,h,a;if(t&&i){for(var f=[],p=Math.max(t.getNorth(),i.getNorth()),w=Math.min(t.getSouth(),i.getSouth()),r=0,v=[t,i],r=0;r=h[0]?e[1]=Math.max(e[1],h[1]):(u.push(e),e=h),r++;u.push(e);var c=u.length,y=u[0][0]+360-u[c-1][1],l=[u[c-1][1],u[0][0]];for(r=1;ry&&(y=a,l=[u[r-1][1],u[r][0]]);s=n.fromEdges(p,l[1],w,l[0])}else t?i||(s=t):s=i;return s},n.fromEdges=function(t,i,r,u,f,o,s){var c,h;return s&&(c=[t,u,r,i]),Math.abs(u-i)>360&&(i=-180,u=180),i=e.normalizeLongitude(i),u=e.normalizeLongitude(u),i>u&&(u+=360),h=(i+u)/2,h=e.normalizeLongitude(h),new n(new e((r+t)/2,h,f,o),u-i,t-r,c)},n.fromCorners=function(t,i){return n.fromEdges(t.latitude,t.longitude,i.latitude,i.longitude,t.altitude)},n.fromLocations=function(){for(var c,b,p,k,nt=[],a=0;a180){for(i.length=s,i.sort(function(n,t){return n-t}),b=i[0]+360-i[s-1],p=0,t=1;tb&&(b=k,p=t);r=i[p];u=i[(p||s)-1]}return n.fromEdges(v,r,y,u,d,g)},n.fromShapes=function(t){var i=null,f,r,e,u;if(t)if(t instanceof Array)for(r=0,e=t.length;r=1&&(i=n.fromLocations(u[0]))):t instanceof di?i=n.fromLocations(t.getLocations()):t.geometry&&t.geometry.boundingBox&&(i=t.geometry.boundingBox);return i},n.fromString=function(t){var r=null,i=t.split(",");if(i&&i.length===4){var u=parseFloat(i[0]),f=parseFloat(i[1]),e=parseFloat(i[2]),o=parseFloat(i[3]);r=n.fromEdges(u,f,e,o)}return r},n.fromRegionId=function(t,i){var h,u,c,l;if(r.assert(t&&t.bounds&&t.bounds.length===4,"Invalid regionId"),h=t.boundingBox,h)i||(h=h.clone());else{u=t.crs;n._createMapLocationObjectPool();var f=n._mapLocationObjectPool.acquire(),e=n._mapLocationObjectPool.acquire(),o=n._mapLocationObjectPool.acquire(),s=n._mapLocationObjectPool.acquire();f.latitude=u.toLatitude(t.bounds[3],t.bounds[0]);f.longitude=u.toLongitude(t.bounds[3],t.bounds[0]);e.latitude=u.toLatitude(t.bounds[1],t.bounds[0]);e.longitude=u.toLongitude(t.bounds[1],t.bounds[0]);o.latitude=u.toLatitude(t.bounds[1],t.bounds[2]);o.longitude=u.toLongitude(t.bounds[1],t.bounds[2]);s.latitude=u.toLatitude(t.bounds[3],t.bounds[2]);s.longitude=u.toLongitude(t.bounds[3],t.bounds[2]);try{if(c=f,l=o,t.crs&&t.crs.heading)switch(t.crs.heading){case 0:break;case 90:c=s;l=e;break;case 180:c=o;l=f;break;case 270:c=e;l=s;break;default:r.assert(!1,"custom crs heading not implemented")}u.sceneMetadata&&(c.latitude=Math.max(f.latitude,e.latitude,o.latitude,s.latitude),c.longitude=Math.min(f.longitude,e.longitude,o.longitude,s.longitude),l.latitude=Math.min(f.latitude,e.latitude,o.latitude,s.latitude),l.longitude=Math.max(f.longitude,e.longitude,o.longitude,s.longitude));h=n.fromCorners(c,l);t.boundingBox=h}finally{n._mapLocationObjectPool.release(f);n._mapLocationObjectPool.release(e);n._mapLocationObjectPool.release(o);n._mapLocationObjectPool.release(s)}}return h},n.areEqual=function(n,t,i){var r=!1;if(n&&t){var u=n.getNorthwest(),f=n.getSoutheast(),o=t.getNorthwest(),s=t.getSoutheast();r=e.areEqual(u,o,!0,i)&&e.areEqual(f,s,!0,i)}return r},n._createMapLocationObjectPool=function(){n._mapLocationObjectPool||(n._mapLocationObjectPool=new pf(4,e,[0,0]))},n}(),vr=function(){function t(){this.image=document.createElement("img")}return t.getPooledImage=function(n,i){t._imagePool||(t._imagePool=new lf(t));var r=t._imagePool.acquire();return r.image||(r.image=document.createElement("img")),n?r.image.crossOrigin=i?"use-credentials":"anonymous":delete r.image.crossOrigin,r},t.prototype.release=function(){var i=this;this.image&&(this.image.src="");n.Browser.is_ie?Microsoft.Maps.setTimeout(function(){t._imagePool.release(i)},1e3):t._imagePool.release(this)},t}(),nt;(function(t){function ot(n){d===-1&&(d=Microsoft.Maps.setTimeout(function(){var i,n,r;d=-1;var f=Date.now(),u=!1,t=h;for(i in e)e.hasOwnProperty(i)&&(n=e[i],n.status===1&&(r=n.timeoutDuration-(f-n.startTime),r<=0?n.abortCallback(null,5):(t=Math.min(t,r),u=!0)));u&&ot(Math.min(t,v))},Math.max(bt,n)))}function p(n,t,i,r,u,f,o,s,c,l,a,y,p,w,b){t=ai(t);typeof FunctionalTestHooks!="undefined"&&FunctionalTestHooks.validateUrl(t);var k=p&&y?e[y]:e[t];return ot(Math.min(v,h)),k||(k={sourceUrl:n,url:t,status:0,successCallbacks:{},errorCallbacks:{},parseResponseCallback:f,callbackStates:{},executor:u,priority:s,hostname:si(t),jsonso:y,callerId:c,startTime:Date.now(),timeoutDuration:a,logKey:w,referrerPolicy:b,isJsonpRequest:!p&&!!y},y&&(e[y]=k),p||(e[t]=k)),k.successCallbacks[l]=i,r&&(k.errorCallbacks[l]=r),o&&(k.callbackStates[l]=o),s===0?tt():Microsoft.Maps.setTimeout(function(){return tt()},wt),k}function gt(n,t,i,r,u,f,s,c,v){n=l(n);var y=(a++).toString(),w=b(y,n);return p(n,n,i,u,function(n){st(n,!1,r?r:"text",null,null,c)},null,f,typeof s=="number"?s:1,t,y,h,null,!1,v),e[n].abortCallback=function(t,i){o(null,n,null,i)},w}function ni(n,t,r,u,f,o,s,h,c){c===void 0&&(c=yt);n=l(n);v=Math.min(v,c);var y=(lt++).toString(),k=(a++).toString(),d=b(k,y);return p(n,n,r,u,function(n){var t=dt(s,h),r=t.image,u;r.onload=function(){var n=e[y];n&&n.status===1&&w(2,y,t)};r.onerror=function(){var n=e[y],i;n&&n.status===1&&(i=!r.complete||r.naturalWidth===0,w(i?3:2,y,t))};n.abortCallback=function(n,i){w(i,y,t)};r.onabort=function(){n.abortCallback&&n.abortCallback(null,3)};u=i.dynamicProperties.referrerPolicy;u&&(t.image.referrerPolicy=u);t.image.src=n.url},null,f,typeof o=="number"?o:0,t,k,c,y,!0),e[y].abortCallback=function(n,t){w(t,y,null)},d}function ti(t,i,r,u,f,s,c,v,y,w){v===void 0&&(v=!0);t=l(t);var k=(a++).toString(),d=b(k,t);return y=y||{},v&&!y["Content-Type"]&&(y["Content-Type"]="application/json; charset=utf-8"),p(t,t,r,u,function(n){st(n,!0,null,y,s)},function(t){var i={succeeded:!1};try{i.response=n.Internals.parseJSON(t);i.succeeded=!0}catch(r){}return i},f,typeof c=="number"?c:1,i,k,h,null,!1,w),e[t].abortCallback=function(n,i){o(null,t,null,i)},d}function ii(n,i,u,f,c,v,y,w,k,d){var wt,nt,ot,st,ct,tt,rt,bt,dt,ft,lt;n=l(n);var et=!0,yt=(a++).toString(),pt=n;return c=c||ci(pt),wt=b(yt,c),n.indexOf(it)<0&&(et=!1),ot=!1,/\{jsonso}/ig.test(n)?(nt=v?vt:ut,n=n.replace(/\{jsonso}/ig,c)):n.indexOf(g)>=0?(st=n.indexOf(g),st>=0&&(tt=n.indexOf("&",st),tt<0&&(tt=n.length),rt=st+g.length,c=n.substr(rt,tt-rt))):(et||(ct=n.indexOf("jsonp="),ct>=0&&(tt=n.indexOf("&",ct),tt<0&&(tt=n.length),rt=ct+6,nt=n.substr(rt,tt-rt))),nt||(nt="f"+c),ot=!0),et&&(bt=at+nt,n=n.replace(it,bt)),dt=function(n){kt(n)},ft=p(pt,n,u,f,dt,null,y,typeof w=="number"?w:1,i,yt,h,c,!1,k,d),ot&&(s[c]?s[c]++:s[c]=1,lt=e[c],et?t.callbacks[nt]=function(n,i,u,f){r.assert(i===c||!i,"If specified, the jsonsoInner parameter must equal jsonso.");f!==4&&f!==3&&(s[c]-=Object.keys(lt.successCallbacks).length);o(n,c,u,f);s[c]===0&&(delete t.callbacks[nt],delete s[c])}:window[nt]=function(n,t,i,r){r!==4&&r!==3&&(s[c]-=Object.keys(lt.successCallbacks).length);o(n,c,i,r);s[c]===0&&(delete window[nt],delete s[c])}),ft&&ft===e[c]?ft.abortCallback=function(i,u){var f=window[nt]?window[nt]:t.callbacks[ot?nt:ut];f&&f(null,c,u===3?500:504,u);u===3&&r.logNetworkData(n,"error")}:ht(ft,0,"downloadJsonp mismatch"),wt}function ri(n){var u,t,f,i;n&&(u=li(n),t=e[u.requestId],t&&(f=Object.keys(t.successCallbacks).length,i=u.callbackId,r.assert(!!i,"Abort request should return back valid dispatchKey"),t.successCallbacks[i]&&(f>1?(t.errorCallbacks[i]&&t.errorCallbacks[i](t.callbackStates[i],4),delete t.errorCallbacks[i],delete t.callbackStates[i],delete t.successCallbacks[i]):t.abortCallback&&t.abortCallback(null,4))))}function fi(n,t,r,u){var h=new AbortController,l=h.signal,e=null,c=i.dynamicProperties.referrerPolicy,s={method:"GET",headers:r||{},signal:l},f;u&&(s.credentials="include");c&&(s.referrerPolicy=c);f=n;f.abortCallback=function(n,t){e=t;h.abort()};fetch(n.url,s).then(function(n){var i=n.headers.get("content-type").toLowerCase();return!t&&(i.indexOf("application/vnd.google-earth.kmz")>-1||i.indexOf("application/zip")>-1||i.indexOf("application/octet-stream")>-1)?n.arrayBuffer():!t&&["image/gif","image/jpeg","video/mp4"].indexOf(i)>-1?n.blob():n.text()}).then(function(n){o(n,f.sourceUrl,n?200:204,2)})["catch"](function(n){e||n.name==="AbortError"?o(null,f.sourceUrl,null,e||4):o(null,f.sourceUrl,null,3)})}function st(n,t,i,r,u,f){var e,c,h,s,l;if(ct())fi(n,t,r,u);else{if(e=et(),c=null,n.abortCallback=function(n,t){c=t;e.abort()},e.onreadystatechange=function(){if(f&&f(e),e.readyState===4&&e.status!==0){var t=e.response||e.responseText;o(t,n.sourceUrl,e.status,2)}},e.onabort=function(){return o(null,n.sourceUrl,null,c)},e.open("GET",n.url),u&&(e.withCredentials=!0),r)for(h=Object.keys(r),s=0,l=h.length;s=200&&r<300,s||(f.status=3));s&&f.parseResponseCallback&&r!==204&&(v=f.parseResponseCallback(n),s=v.succeeded,s||(f.status=3),n=v.response);var p=f.successCallbacks,w=f.callbackStates,b=f.errorCallbacks;if(f.successCallbacks={},f.callbackStates={},f.errorCallbacks={},s)try{for(f.logKey&&(d=Date.now()-f.networkStartTime,ui.record(f.logKey,d)),o=0,h=Object.keys(p);o=ft?1e4:u,(t0&&(i.indexOf("dev.virtualearth.net/rest")>-1||i.indexOf("dev.ditu.live.com/rest")>-1)&&(t+=n.indexOf("?")>-1?"&":"?",t+="clientApi="+encodeURIComponent(u.ClientApi)),t}function l(n){var t=pt.instance,u=i.dynamicProperties,r;return n=n.replace("{srcparam}",i.tileSourceParam?"&src=".concat(i.tileSourceParam):"").replace("{credentials}",t&&t.getSessionId()).replace("{cmnPltParam}",i.platformCommonParam),r=u.compositionHandlerGenerationId,t&&t.isKeyBasedDataSrcFeatureEnabled&&i.tileSourceParam==="o"&&(r=u.osmGenerationId),n.replace("{odmgenid}",r)}function ct(){return i.dynamicProperties.referrerPolicy&&"fetch"in window&&"AbortController"in window}var e={},s={},k=0,lt=0,a=0,d=-1,c={},at=window.$MicrosoftMaps8.toString()+".NetworkCallbacks.",it="{callback}",rt="~DispatchKey~",g="jsonso=",ut="normal",vt="reverse",h=25e3,yt=15e3,v=15e3,wt=5,bt=1e3,ft=-1,nt=-1,y,et=function(){var n=null,t=u.Internal.originalXMLHttpRequest;return typeof t!="undefined"?n=new t:typeof ActiveXObject!="undefined"&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n},kt=function(n){var t=document.createElement("script"),r=i.dynamicProperties.referrerPolicy;t.type="text/javascript";t.src=n.url;t.async=!0;t.onerror=function(){Microsoft.Maps.setTimeout(function(){n.abortCallback&&n.abortCallback(null,3)},0)};n.scriptElement=t;n.referrerPolicy?t.referrerPolicy=n.referrerPolicy:r&&(t.referrerPolicy=r);document.getElementsByTagName("head")[0].appendChild(t)},dt=function(n,t){return vr.getPooledImage(n,t)};t.downloadGeneric=gt;t.downloadImage=ni;t.downloadJson=ti;t.downloadJsonp=ii;t.abortRequest=ri;t.callbacks={normal:o,reverse:ei};t.doPost=oi})(nt||(nt={}));var du=function(){function n(){if(n.instance)return n.instance}return n.prototype.getCopyrights=function(n,t,u,f,e,o,s,h,c){if(r.assertNotNull(t,"imageryId"),o=o||0,e=Math.round(e),t&&f&&e&&s){var l=n.replace(/{imagerySet}/,t).replace(/{productId}/,u).replace(/{zoom}/,e.toString()).replace(/{minLat}/,f[2].toString()).replace(/{minLon}/,f[3].toString()).replace(/{maxLat}/,f[0].toString()).replace(/{maxLon}/,f[1].toString()).replace(/{heading}/,o.toString()).replace(/{credentials}/,s).replace(/{mkt}/,i.dynamicProperties.market).replace(/{ml}/,h.getConfig().copyrightMapLayers);this._downloadCopyright(l,h,c)}},n.prototype._copyrightServiceCallback=function(n,t,r,u){var o,e;if(!t.isDisposed()){if(o=[],n)if(e=n.resourceSets&&n.resourceSets.length>0&&n.resourceSets[0]&&n.resourceSets[0].resources[0]&&n.resourceSets[0].resources[0].imageryProviders,e&&e.length>0&&e[0]!=="")Array.prototype.push.apply(o,e);else if(u&&t.getMapType().id===s.ordnanceSurvey&&u.indexOf("OrdnanceSurvey")>-1){u=u.replace("OrdnanceSurvey","RoadOnDemand");this._downloadCopyright(u,t,r);return}(i.isSDK||!f._hasBingHeaders())&&o.push(this._getDefaultCopyright());r(o)}},n.prototype._downloadCopyright=function(n,t,i){var r=this,u=Math.floor(Math.random()*1e6).toString();nt.downloadJsonp(n,"copyright",function(u){return r._copyrightServiceCallback(u,t,i,n)},function(){return r._copyrightServiceCallback(null,t,i)},u.toString(),null,null,3)},n.prototype._getDefaultCopyright=function(){return String.fromCharCode(169)+" "+(new Date).getFullYear()+" Microsoft Corporation"},n.instance=new n,n}(),si=function(){function n(n,t,i){this._imageryId=n;this._map=t;this._imageryCopyrightUrlFormat=i}return n.prototype.getCopyrights=function(n,t,i,r,u){var f=this;pt.instance.authenticateClientAndRetrieveSessionId(function(e){!f._map.isDisposed()&&e&&du.instance.getCopyrights(f._imageryCopyrightUrlFormat,f._getImageryId(i),n,t,i,r,e,f._map,u)})},n.prototype._getImageryId=function(n){var t=this._imageryId,i=this._map.getLabelController();return t==="Aerial"&&i&&i.getIsLabelsEnabled()&&(t+="WithLabels"),(t==="AerialWithLabels"||t==="Road")&&(t+="OnDemand"),t==="OrdnanceSurvey"&&(n>18||n<12)&&(t="RoadOnDemand"),t},n}(),gu=function(n){function t(t,r,u,e,o,h){var c=n.call(this)||this,it,v,tt,k,rt,l,y,ut,d,p,w,a,g,ft,nt,et,ot;c._map=t;c._mapTemplateUrlFormat=r.mapTemplateUrlFormat;c._mapLiteTemplateUrlFormat=r.mapLiteTemplateUrlFormat;c._container=u;c._coreConfig=r;c._templateSelectorCache=new li(50);c._miscCache=new li(25);c._completionCallback=h;c._tileDomainName=o;c._pendingCount=r.mapTypeDefinitions.length;it=c._customMapStyleManager=u.instance("CustomMapStyleManager");v=c._map.getMapOptions();v.customMapStyle&&it.update(v.customMapStyle);tt=!!v.liteMode;c._dpiParam=t.getDpiScale()===2?"d2":"";var st=t.getZoomOffset(),ht=f._getUrlParam(window.location,"loadallstyles")==="1",b=r.mapTypeDefinitions;for(f._isFeatureEnabled("supportedMaps")&&(b=c._getSupportedMapTypeDefs(b,e)),k=0,rt=b.length;k-1){for(u=1;u=a&&(i=[s.road].concat(i))}for(this._coreConfig.defaultMapType=i[0],t&&h.mapType===t&&i.indexOf(t)<0&&(h.mapType=i[0]),v={},e=0,y=n;e=0&&(v[r.mapType]=r);for(o=0,p=i;o0)for(f=i=new ot(n.id,n.zIndex,1,!0,undefined,undefined,undefined,this._map.getMapOptions().enableCORS),r=0,u=n.imageryScenes.length;rthis._sessionKeyExpiryTime?(this._logServiceResponse=null,this._hasValidCredentials=undefined,this._authFailureCount=0,!0):!1},n.prototype._logServiceSuccessCallback=function(t){var u,e,o,f;if(r.assertNotNull(t,"response"),this._isAuthInProgress=!1,this._authFailureCount=0,this._hasValidCredentials=t.authenticationResultCode===this._validAuthenticationResultCode,u=t.features,this._logServiceResponse=t,this._hasValidCredentials?t.sessionIdExpirationTime&&(this._sessionKeyExpiryTime=new Date(t.sessionIdExpirationTime).getTime()-n._sessionExpMargin):this._showInvalidCredentialsError(),this._callbackPool.forEach(function(n){try{n&&n(t.sessionId)}catch(i){}}),this._callbackPool=[],i.featuresEnabledByAuthKey&&u&&u.length>0){for(e="&setfeatures=",i.platformCommonParam.indexOf(e)===-1&&(i.platformCommonParam+=e+u.join(",")),o=i.tileSourceParam,f=0;f0)for(n=0;no&&(o=c),a=Math.abs(f.longitude-i[h].longitude),a>s&&(s=a);try{var p=new e(f.latitude-o,f.longitude+s),w=new e(f.latitude+o,f.longitude+s),b=new e(f.latitude+o,f.longitude-s),k=new e(f.latitude-o,f.longitude-s),d=t.getMode().getMapViewForLocationsInView([b,k,p,w],u),y=l.fromLocation(d.cameraLocation,!0);return y<3?NaN:y}catch(g){return NaN}},n._getColorMapping=function(n){switch(n){case 1:case 2:case 3:return n-1;case 7:return 3;case 4:return 4;case 8:return 5;default:return 0}},n}(),ff=function(o){function a(u,e,h,c,v,p,w){var k=this,st={},it,ht,nt,ut,g,ft,et,d,vt,ot;k=o.call(this,st)||this;k._mapOptions=e=a._initializeMapOptions(e,c);k._coreConfig=c;e.disableInstrumentation&&(i.enableInstrumentation=!1,i.enableErrorInstrumentation=!1,i.perfSDKInclusions=null);it={position:"absolute",overflow:"hidden",width:"100%",height:"100%",top:"0",left:"0"};k._privates=st;k._disposables=[];k._disposables.push(k._workDispatcher=w);f._getUrlParam(window.location,"labelTest")&&(ht=f._createElement("div").set_attr("id","labelTestHook").appendTo(u),r.setLabelLogElement(ht));k._id=a._nextMapId++;k._container=h;k._disposables.push(k._container);k._processDpiOptions();u=k._parentElement=n(u);nt=k._rootElement=f._createElement("div").appendTo(u).add_class("MicrosoftMap").set_style({"-ms-touch-action":"none"});k._sizeHelper=new ir(nt);k._disposables.push(k._sizeHelper);k._disposables.push(k._sizeHelper.resize.add(function(n){k._privates.setActualSize(n[0]);k.mapResized.invoke()}));k._modeElement=f._createElement("div").appendTo(nt).set_style(it);k._overlayElement=f._createElement("div").appendTo(nt).set_style(it).set_style({pointerEvents:"none",transform:"scale(1)"});k._overlayElement.set_style({"z-Index":100});e.allowInfoboxOverflow&&k._overlayElement.set_style({overflow:"visible"});k._disposables.push(k.copyrightControlLoaded=new t,k.frameManagerLoaded=new t,k.labelControllerLoaded=new t,k.navigationBarLoaded=new t,k.mapTypeButtonClicked=new t,k.constrainView=new t,k.viewChanging=new t,k.viewChanged=new t,k.targetViewChanged=new t,k.mapResized=new t,k.primitiveTapped=new t,k.primitiveDoubleTapped=new t,k.primitiveHoverStarted=new t,k.primitiveHoverStopped=new t,k.primitiveMoveStarted=new t,k.primitiveMoveContinued=new t,k.primitiveMoveStopped=new t,k.primitiveManipulationStarted=new t,k.primitiveManipulationContinued=new t,k.primitiveManipulationStopped=new t,k.boxZoomStarted=new t,k.boxZoomContinued=new t,k.boxZoomStopped=new t,k.boxZoomCancelled=new t,k.onLocateMeEvent=new t,k.mapPanStarted=new t,k.mapPanContinued=new t,k.mapPanStopped=new t,k.mapZoomStarted=new t,k.mapZoomContinued=new t,k.mapZoomStopped=new t,k.mapManipulationStarted=new t,k.mapManipulationContinued=new t,k.mapManipulationStopped=new t,k.mapTapped=new t,k.mapDoubleTapped=new t,k.keyPressed=new t,k.keyReleased=new t,k.pointerMoved=new t,k.pointerEntered=new t,k.pointerExited=new t,k.pointerWheelChanged=new t,k.pointerPressed=new t,k.pointerReleased=new t,k.contextMenuInvoked=new t,k.copyrightChanged=new t,k.mapTypeChanged=new t,k.mapTypeChangeStarted=new t,k.mapModeChanged=new t,k.actualSizeChanged=new t,k.mapZoomChanged=new t,k.mapRadialMenuChanged=new t,k.setViewInvoked=new t,k.interactionModeUpdated=new t,k.mapOptionsChanged=new t,k.viewChangingAfterPaint=new t,k.birdseyeV2SceneTransitioned=new t,k.modeDOMsMounted=new t);k._disposables.push(k.mapOptionsChanged.add(function(n){k._updateMapOptions(k._mapOptions,n)}),k.mapPanStarted.add(function(){k._isPanning=!0}),k.mapPanStopped.add(function(){k._isPanning=!1}));ut=null;e.testHooksOptions&&(e.testHooksOptions.perfRun&&r.setPerfRun(!0,!0),e.testHooksOptions.debugRun&&r.setDebugRun(!0),e.testHooksOptions.enableFunctionalTestHooks&&r.setTestHook(u,c,k),e.testHooksOptions.perfTest&&(ut="perfTest"));k._AuthenticateMap();k._mapOverlayBehavior=new nf;k._mapOverlayBehavior.attach(k);var ct=k._getDefaultSize(u),lt=ct.width,at=ct.height;return k._privates.defineProperty("baseLayers",function(n,t){return k._onMapTypeChanged(n,t)},function(n,t){return k._resolveMapType(n,t)}),k._privates.defineProperty("mode",function(n,t){return k._onModeChanged(n,t)}),k._privates.defineProperty("actualSize",function(n,t){return k._onActualSizeChanged(n,t)},null,{isPrivate:!0}),k._privates.defineProperty("desiredSize",function(n,t){return k._onDesiredSizeChanged(n,t)},null,{defaultValue:new b(lt,at)}),k._privates.defineProperty("viewportPadding",null,function(n){return k._setViewportPadding(n)},{defaultValue:{left:0,top:0,right:0,bottom:0}}),k._birdseyeV2ManagerPromise=new rt,k._disposables.push(k._mapTypes=new gu(k,c,h,e.mapType,e.tileDomainName),k._layers=new tt),e.center?(g={center:e.center,zoom:undefined},e.center.altitude&&(g.zoom=l.fromLocation(e.center,!0))):g=a._getBootstrapLocation(),r.assert(c.defaultZoomLevel>0,"defaultZoomLevel in config is set to incorrect value. coreConfig.defaultZoomLevel = "+c.defaultZoomLevel),(!c.defaultZoomLevel||c.defaultZoomLevel<=0)&&(c.defaultZoomLevel=11),ft=typeof e.zoom=="number"?e.zoom:g.zoom||c.defaultZoomLevel,et=c.defaultMapType||s.road,d=e&&e.mapType||et,d===s.birdseye&&(k.getMapOptions().disableBirdseye||ft<=k._coreConfig.aerialCutOffZoom)&&(d=s.aerial),e.disableStreetside&&(d===s.streetside&&(d=et),e.disableStreetsideAutoCoverage=!0),k._disposables.push(k._allLayers=new ou(k)),k.setBaseLayers(k._resolveMapType(d,k.getMapTypes()[s.road])),h.registerInstance("Map",k),h.registerInstance("allLayers",k._allLayers),k._instrumentationManager=new wu(k,v,p,ut),k._landmarksManagerPromise=new rt,k._overlayManager=new rt,k._cityPolygonManagerPromise=new rt,k._disposables.push(k._instrumentationManager),vt=e.heading||0,k.setMinZoom(k._mapOptions.minZoom,!1),k.setMaxZoom(k._mapOptions.maxZoom,!1),k.setDesiredSize(new b(lt,at)),k._bootstrapState=0,ot=k.getView()||new y(l.toLocation(g.center,ft,!0),vt),d===s.streetside?k._instantiateMapInStreetsideMapMode(ot):k._instantiateMapInCompositeMapMode(ot),k._processNavigationBarMapOptions(),i.disposeMapOnPageHide&&(k._pageHideHandler=function(){k.dispose()},n(window).add_event("pagehide",k._pageHideHandler)),(n.Browser.is_ie||n.Browser.is_edge)&&n(window).add_event("beforeunload",k._beforeUnloadDummyHandler),k}return p(a,o),a.prototype.enableFocus=function(){var n=this.getMode();n&&n.enableFocus()},a.prototype.getCopyrightControl=function(){return this._coreConfig.useOverlayQuadrants&&this._mapOverlayManager?this._mapOverlayManager.getCopyrightControl():this._copyrightControl},a.prototype.getLogoControl=function(){return this._coreConfig.useOverlayQuadrants&&this._mapOverlayManager?this._mapOverlayManager.getLogoControl():this._logoControl},a.prototype.getSizeHelper=function(){return this._sizeHelper},a.prototype.getDefaultAerialZoomCutOffForBirdsEyeMode=function(){return this._coreConfig.aerialCutOffZoom},a.prototype.getId=function(){return this._id},a.prototype.getConfig=function(){return this._coreConfig},a.prototype.getDpiScale=function(){return this._tileDpiScale},a.prototype.getLabelDpiScale=function(){return this._labelDpiScale},a.prototype.getZoomOffset=function(){var n=this.getDpiScale();return n>1?Math.floor(c.log2(n)):0},a.prototype.getLabelController=function(){return this._labelController},a.prototype.getNavigationBar=function(){return this._navigationBar},a.prototype.getScaleBar=function(){return this._coreConfig.useOverlayQuadrants&&this._mapOverlayManager?this._mapOverlayManager.getScaleBar():this._scaleBarControl},a.prototype.getMapOptions=function(){return this._mapOptions},a.prototype.getLayers=function(){return this._layers},a.prototype.getAllLayers=function(){return this._allLayers},a.prototype.getOverlays=function(){return this._overlayCollection},a.prototype.getMapOverlayManager=function(){return this._mapOverlayManager},a.prototype.getRootElement=function(){return this._rootElement},a.prototype.getContainer=function(){return this._container},a.prototype.getMapTypes=function(){return this._mapTypes},a.prototype.getLandmarksManager=function(){return this._landmarksManagerPromise},a.prototype.getOverlayManager=function(){return this._overlayManager},a.prototype.getCityPolygonManager=function(){return this._cityPolygonManagerPromise},a.prototype.getBirdseyeV2Manager=function(){return this._birdseyeV2ManagerPromise},a.prototype.isLocationInView=function(n){var i=this.getMode(),t;return n&&i?(t=i.tryLocationToPoint(n),t&&t.x>=0&&t.x<=this.getActualSize().width&&t.y>=0&&t.y<=this.getActualSize().height):!1},a.prototype.getFrameManager=function(){return this._frameManager},a.prototype.isDisposed=function(){return this._isDisposed},a.prototype.isPanning=function(){return this._isPanning},a.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,o.prototype.dispose.call(this),this._viewStoryboard&&this._viewStoryboard.abort(),this._mapOverlayBehavior&&this._mapOverlayBehavior.detach(),this._overlayElement.clear()&&this._overlayElement.removeFromParent(),this._modeElement.clear()&&this._modeElement.removeFromParent(),this._rootElement.clear()&&this._rootElement.removeFromParent(),this._parentElement.clear(),(n.Browser.is_ie||n.Browser.is_edge)&&n(window).remove_event("beforeunload",this._beforeUnloadDummyHandler),this._pageHideHandler&&n(window).remove_event("pagehide",this._pageHideHandler),f._clearDisposables(this._disposables),f._nullifyClass(this))},a.prototype.getView=function(){return this._view},a.prototype.getTargetView=function(){return this._targetView},a.prototype.getViewport=function(){var n=this.getBounds(),t=this.getActualSize()||{width:0,height:0},i=t.width,r=t.height;return new u.Viewport(i,r,n.bounds,n.crs)},a.prototype.getMercatorZoomLevel=function(){return this._view?l.fromLocation(this._view.cameraLocation,!0):0},a.prototype.getBounds=function(n,t){var u=t?t:this.getView(),r,l,a,v,y;if(!u)return new w(new e(0,0),0,0);r=n?this.getViewportPadding():{left:0,right:0,top:0,bottom:0};var o=this.getActualSize(),s=new h(r.left,r.top),p=new h(o.width-r.right,r.top),c=new h(o.width-r.right,o.height-r.bottom),b=new h(r.left,o.height-r.bottom),i,f=this.getMode();if(u.heading===0?(l=f.tryPointToLocation(s,u),a=f.tryPointToLocation(c,u),i=w.fromCorners(l,a)):(v=new ri,i=v.accumulateLocations([f.tryPointToLocation(s,u),f.tryPointToLocation(p,u),f.tryPointToLocation(c,u),f.tryPointToLocation(b,u)])),f.getTileSize){var k=this.getMercatorZoomLevel(),d=Math.pow(2,k),g=d*f.getTileSize().width;o.width>g&&(i=w.fromEdges(i.getNorth(),-180,i.getSouth(),180))}return y=1e-9,i.width<=y&&(i=w.fromEdges(i.getNorth(),-180,i.getSouth(),180)),i},a.prototype.getCopyrights=function(n){var t=this.getMode();t&&t.getCopyrights(n)},a.prototype.getIsMapHitTestable=function(){return this._mapOptions&&this._mapOptions.testHooksOptions&&this._mapOptions.testHooksOptions.hitTest},a._getBootstrapLocation=function(){var t=i.dynamicProperties,n=t.location,o,h;if((!n||n==="0,0")&&(n=t.reverseIPLocation,!n)){var s=ct,u=parseFloat(s.getItem("centerLatitude")),f=parseFloat(s.getItem("centerLongitude"));if(isFinite(u)&&isFinite(f)){if(o=parseFloat(s.getItem("zoom")),isFinite(o))return h=l.toAltitude(new e(u,f),o,!0),{center:new e(u,f,h),zoom:o};n=u+","+f}else n=t.marketLocation,r.assert(!!n,"unable to determine bootstrap location"),n||(n="47.603569,-122.329453")}return{center:e.parseLatLong(n),zoom:t.zoom}},a.prototype.setView=function(t,i,f,e){function ut(n,t){r.groupCollapsed(null,"Animation frame: {0}",t.percent.toString());var u=i.interpolate(h,s,t.percent),e=o._view;o._view=u;o._raiseViewChangingEvent(new yt(f,!0));tt(i)&&o.mapZoomContinued.hasHandlersRegistered()&&o.mapZoomContinued.invoke(new hi(o,i));r.groupEnd()}function ft(){var n=function(){var t=o._view,n;o._view=o._targetView;o._saveView();o.changed.invoke(new vt(o,"view",t,o._view));o.viewChanged.invoke(new yt(f));tt(i)&&o.mapZoomStopped.hasHandlersRegistered()?o.mapZoomStopped.invoke(new hi(o,i)):(n=o.getFrameManager(),n&&n.hackHackSetFrame(e));o.copyrightChanged&&o.copyrightChanged.invoke()};o._workDispatcher.dispatch(n,a._animationFrameWorkDispatcherKey,0)}function tt(n){return u.ZoomAroundLocationAnimator?n instanceof u.ZoomAroundLocationAnimator:!1}var o,w,b,h,s,k,c,v,d,g,rt,nt;if(!this._isDisposed&&(r.assertNotNull(t,"mapView"),r.assertNotNull(t.cameraLocation,"mapView.cameraLocation"),r.assert(t.cameraLocation.altitudeReference!==-1,"Invalid AltitudeReference"),o=this,f=f||0,(f===1||f===2)&&this._mapOptions&&this._mapOptions.navigationOptions&&(w=this._mapOptions.navigationOptions,w.lockCameraAltitude&&(t.cameraLocation.altitude=this._targetView.cameraLocation.altitude,t.cameraLocation.altitudeReference=this._targetView.cameraLocation.altitudeReference),this._enforceMinMaxAltitude(t),w.lockCameraHeading&&(t.heading=this._targetView.heading)),e||!y.areEqual(t,this._targetView))&&(this._view=this._view||t,b=this._getConstrainViewArgs(t,f),!b.cancel)){h=this._view;s=t;i&&(this._workDispatcher&&this._workDispatcher.cancelAllDispatch(),h=h.clone(),s=s.clone(),k=h.cameraLocation.longitude,c=s.cameraLocation.longitude,Math.abs(k-c)>180&&(k<0?c-=360:c+=360,s.cameraLocation.longitude=c));this._workDispatcher&&this._workDispatcher.cancelDispatchWithKey(a._animationFrameWorkDispatcherKey,0);var p=this._viewStoryboard,it=0,l=0;p&&(l=p.get_duration(),it=(1-p.get_position())*l,p.abort(),this._viewStoryboard=null);t=b.view;v=this._targetView;this._targetView=t;v&&t&&v.cameraLocation&&t.cameraLocation&&(y.areCameraAltitudesEqual(v,t)||this.mapZoomChanged.invoke());this.changed.invoke(new vt(this,"targetView",v,t));this.targetViewChanged.invoke(new tf(f,i));d=i?i.duration:0;l=Math.max(l,a._viewChangeMaxPercent*d);g=Math.min(it+d,l);i&&g>0?(this._viewStoryboard=n.Effects.Storyboard.create([this],{percent:0},{percent:1},ut,g,null,ft,function(n){return n},a._animationInterval),this._viewStoryboard.begin(),tt(i)&&this.mapZoomStarted.hasHandlersRegistered()&&this.mapZoomStarted.invoke(new hi(this,i))):(rt=this._view,this._view=t,this.changed.invoke(new vt(this,"view",rt,t)),this._raiseViewChangingEvent(new yt(f,!0)),f!==2&&(this.viewChanged.invoke(new yt(f)),this.copyrightChanged&&this.copyrightChanged.invoke(),this._saveView(),this._coreConfig.disableHachHackSetFrame||(nt=this.getFrameManager(),nt&&nt.hackHackSetFrame(e))))}},a.prototype.canZoom=function(n){if(this._isDisposed)return!1;var r=this.getMode(),i=this.getTargetView(),u=i.cameraLocation,t=r.getMapViewZoomedAboutLocation(i,u,n);return t=this._getConstrainViewArgs(t).view,this._enforceMinMaxAltitude(t),!y.areCameraAltitudesEqual(i,t)},a.prototype.getMapType=function(){return this._mapType},a.prototype.setMapType=function(n){if(typeof n=="string"&&(n=this._resolveMapType(n)),!this._isDisposed&&n!==this._mapType){var t=this._mapType;this.setBaseLayers(this._resolveMapType(n))}},a.prototype.createMapType=function(n){return this._resolveMapType(n)},a.prototype.getTemplateSelector=function(){return this._mapType&&this._mapType.getTemplateSelector()},a.prototype.setMinZoom=function(n,t,i){var r,u,f;if(typeof n=="number"){if(t!==!1&&(t=!0),n=Math.round(n),r=l.toAltitude(new e(0,0),n,!0),u=this._mapOptions.navigationOptions.minCameraAltitude,typeof u=="number"&&rr&&(f=this._targetView.cameraLocation.clone(),f.altitude=r,this.setView(new y(f)))}},a.prototype.setMaxZoom=function(n,t){var i,r,u;if(typeof n=="number"){if(t!==!1&&(t=!0),n=Math.round(n),i=l.toAltitude(new e(0,0),n,!0),r=this._mapOptions.navigationOptions.maxCameraAltitude,typeof r=="number"&&i>r)throw new Error("maxZoom to set is smaller than map's currently allowed minimal zoom level");this._mapOptions.maxZoom=n;this._mapOptions.navigationOptions.minCameraAltitude=i;t&&this._targetView.cameraLocation.altitude0;){if(t[0].tagName==="HTML"||r===-1&&u===-1)break;typeof Element=="function"&&t[0]instanceof Element?(e=parseFloat(t.get_style("width")),o=parseFloat(t.get_style("height")),e>0&&(r=-1),o>0&&(u=-1)):(f=t.get_size(),f.width>0&&(r=-1),f.height>0&&(u=-1));t=t.parent()}return r=r===-1?r:-2,u=u===-1?u:-2,new b(r,u)},a.prototype._resolveMapType=function(n,t){var r,u;return this._isDisposed?null:(t||(t=this.getMapTypes()[s.road]),r=t,typeof n=="string"?(u=this._mapTypes[n],u&&((n!==s.ordnanceSurvey||!i.features.ordnanceSurvey.isEnabled)&&n===s.ordnanceSurvey||(r=u))):r=n,r)},a.prototype._setViewportPadding=function(n){n=n||{};return{left:n.left||0,top:n.top||0,right:n.right||0,bottom:n.bottom||0}},a.prototype._saveView=function(){if(!this._isDisposed){var t=this.getView().cameraLocation,n=this._coreConfig.locateMeViewExpirationDays;ct.setItem("centerLatitude",t.latitude.toString(),n);ct.setItem("centerLongitude",t.longitude.toString(),n);ct.setItem("zoom",this.getMercatorZoomLevel().toString(),n)}},a.prototype._onMapTypeChanged=function(n,t){var u,h,c;if(!t||!s.isValid(t.id))throw new Error("Map._onMapTypeChanged trying to set map type to unsupported value");if(t.id===s.road&&f._isHighContrastMode()&&(u=this.getMapTypes().find(function(n){return n.id===s.highContrast}),u&&(t=u)),this._mapType=t,n&&t&&n.id&&t.id&&this.mapTypeChangeStarted.invoke(new yr(n.id,t.id)),this._allLayers.setBaseLayers(t),n&&t&&n.id&&t.id&&this.mapTypeChanged.invoke(new yr(n.id,t.id)),this._view){var o=this.getMercatorZoomLevel(),r=null,i=this._view.cameraLocation;othis._mapType.maxZoom&&(r=l.toAltitude(i,this._mapType.maxZoom,!0));r&&(h=new e(i.latitude,i.longitude,r,i.altitudeReference),c=new y(h,this._view.heading),this.setView(c))}},a.prototype._onMapModePaint=function(){var n=this,t;r.logDebugData("Map - onMapModePaint");t=function(){n._modePaintHandler&&(n._modeElement.fadeToChild(n.getMode().getRootElement()),n.modeDOMsMounted.invoke(n.getMode().mapModeType),n._modePaintHandler.dispose(),n._modePaintHandler=null,n._frameRenderedHandler&&n._frameRenderedHandler.dispose(),n._frameFailedHandler&&n._frameFailedHandler.dispose())};this._frameManager&&(this._frameManager.frameRendered.isPreviouslyInvoked||this._frameManager.frameFailed.isPreviouslyInvoked?t():this._frameRenderedHandler||(this._frameRenderedHandler=this._frameManager.frameRendered.addOne(t),this._frameFailedHandler=this._frameManager.frameFailed.addOne(t)))},a.prototype._instantiateMapInCompositeMapMode=function(n){var t=this,f=this.getContainer(),e=function(i){var e=!!u.BirdseyeV2Manager,o=function(){t._instantiateFrameManager();t._disposables.push(t._modePaintHandler=i.onFrameRendered.addOne(function(){return t._onMapModePaint()}));t._targetView||t.setView(n,null,3)},h=function(n){if(t._disposables.push(n),t._birdseyeV2ManagerPromise.resolve(n),t._mapType.id===s.birdseyeV2)n.onMapTypeChanged({oldMapTypeId:null,newMapTypeId:s.birdseyeV2});e&&o()};t._instrumentationManager.setMapMode(i);r.logDebugData("Map - Composite Map mode ctor: mapMode.onPaint "+i.onPaint);t.setMode(i);t._view=t._view||n;e?h(new u.BirdseyeV2Manager(t)):(o(),t._frameManager.frameRendered.addOne(function(){f.instanceAsync("BirdseyeV2Manager",h,{Map:t})}))};f.instanceAsync("CompositeMapMode",e,undefined,!i.isMapsVertical)},a.prototype._instantiateMapInStreetsideMapMode=function(n){var t=this;this._view=this._targetView=n;this.getContainer().instanceAsync("StreetsideModeBootstrapper",function(r){var u=t._mapOptions.streetsideOptions||{},f=function(){t._mapOptions.mapTypeId=s.road;t.setBaseLayers(t._resolveMapType(s.road,t.getMapTypes()[s.road]));t._instantiateMapInCompositeMapMode(n);u.onErrorLoading&&u.onErrorLoading()},e=t._mapOptions.streetsideOptions&&t._mapOptions.streetsideOptions.panoramaInfo;r.isAvailable(e||t.getView().cameraLocation,function(n){var u=t._mapOptions.streetsideOptions||{},f=new lr({mapType:s.streetside,templateName:"097A0D85-2585-425A-8471-60BDD3C5B7C3",data:[],minZoom:18,maxZoom:23,mapTypeEnabled:!0},t._mapOptions,0);t._disposables.push(f);t._mapType=f;t._instantiateFrameManager();u.zoomIn=!0;u.entryPoint=i.isMapsVertical?"Permalink":"SDK";u.perfClickToImmersionTimeSource="SS_PCI";u.heading=t._mapOptions.heading;u.pitch=t._mapOptions.pitch;r.show(n,u)},f,u)},undefined,!i.isMapsVertical)},a.prototype._instantiateFrameManager=function(){var n=this,t;this._bootstrapState===0&&(this._onFrameManagerLoaded(new ti(this,this._allLayers)),t=i.features.labels.glLabelAndPoi?"LabelControllerGL":"LabelController",this._container.instanceAsync(t,function(t){if(!n._isDisposed){n._labelController=t;n._disposables.push(n._labelController);n._labelController.attach(n);n.labelControllerLoaded.invoke();var i=n._mapOptions.labelOptions.labelVisibility===wt.visible||n.getMapType().id===s.road&&!n._mapOptions.allowHidingLabelsOfRoad?!0:!1;n._labelController.setIsLabelsEnabled(i);n.navigationBarLoaded.addOne(function(){return n.getNavigationBar().getHelper().setLabelVisible(i)},!1,!0);r.logDebugData("Map - onMapModePaint - LabelController created")}},{CoreConfig:this._coreConfig},!1,function(n,t){console.log(t)}),this._bootstrapState=1)},a.prototype._onFrameManagerLoaded=function(n){var t=this;this._isDisposed||(this._frameManager=n,this._disposables.push(this._frameManager),this.frameManagerLoaded.invoke(this._frameManager),this._disposables.push(this._frameManager.frameRendered.addOne(function(){return t._postInit()})),this._disposables.push(this._frameManager.frameFailed.addOne(function(){return t._postInit()})),this._frameManager.initializeLayers(),r.logDebugData("Map - onMapModePaint - MapFrameManager created"),i.isMapsVertical?this._container.downloadDependencyAsync("TransientLens"):this._disposables.push(this._frameManager.dataLoaded.addOne(function(){t._container.downloadDependencyAsync("MapInteraction")})))},a.prototype._postInit=function(){var n=this,t;r.logDebugData("Map - postInit");this._bootstrapState!==2&&(this._container.instanceAsync("BrowserKeyProvider",function(t){n._disposables.push(t)}),this._container.instanceAsync("BrowserPointerProvider",function(t){n._disposables.push(t)}),this._container.instanceAsync("GlobalDataEventHandler",function(){var t=i.features.streetside;!n.getMapOptions().disableStreetsideAutoCoverage&&t&&t.isEnabled&&n._container.instanceAsync("StreetsideAutoEntryBehavior",null,{Map:n})}),this._overlayCollection=new tt,this._container.instanceAsync("OverlayManager",function(t){t.getRootElement().appendTo(n._overlayElement);r.logDebugData("Map - postInit - Overlay Manager created");n._overlayManager.resolve(t)}),this._mapOptions&&this._mapOptions.showLandmarks!==!1&&this._container.instanceAsync("LandmarksManager",function(t){n._isDisposed||(t.selectorReady(),n._disposables.push(n._landmarksManager=t),n._landmarksManagerPromise.resolve(t))},{map:this,coreConfig:this._coreConfig,container:this._container}),this._bootstrapState=2,this.getMode().mapModeType===0&&this._postInitForCompositeMode(),this._container.instanceAsync("CityPolygonManager",function(t){if(!n._isDisposed){n._disposables.push(n._cityPolygonManager=t);n._cityPolygonManagerPromise.resolve(t);var i=f._getPolygonId();i&&n._cityPolygonManager.addLayer(i,7,17);n._disposables.push(t)}},{map:this,coreConfig:this._coreConfig}),t=this._mapOptions&&this._mapOptions.isPrintMode,f._isFeatureEnabled("flyover")&&this._mapOptions&&this._mapOptions.showFlyover&&!t&&this._container.instanceAsync("Flyover",null,{Map:this}),f._isFeatureEnabled("flywheel")&&!t&&this._container.instanceAsync("Flywheel",null),f._isFeatureEnabled("flywheelBanner")&&!t&&this._container.instanceAsync("FlywheelBanner",null))},a.prototype._postInitForCompositeMode=function(){var n=this,t;this._haveCalledPostInitForCompositeMode||(this._haveCalledPostInitForCompositeMode=!0,this._mapOptions.maxBounds&&this.setMaxBounds(this._mapOptions.maxBounds),typeof this._mapOptions.hideNavBar=="boolean"&&this._mapOptions.hideNavBar||this._createNavigationBar(),this._coreConfig.useOverlayQuadrants?this._container.instanceAsync("MapOverlayManager",function(t){n._disposables.push(n._mapOverlayManager=t)},{Map:this,RootElement:this._overlayElement}):(this._mapOptions&&this._mapOptions.showLogo&&(t=typeof this._mapOptions.enableClickableLogo!="undefined"?this._mapOptions.enableClickableLogo:!0,this._container.instanceAsync("LogoControl",function(t){n._logoControl=t;n._disposables.push(t);n._container.instanceAsync("LogoOverlay",function(t){n.getOverlays().insert(t)},{LogoControl:t})},{Map:this,Clickable:t})),this._createCopyrightControl(),this._createScaleBar()))},a.prototype._createNavigationBar=function(){var n=this;this._container.instanceAsync("NavigationBar",function(t){r.logDebugData("Map - postInit - Navigation Bar created");n._navigationBar=t;n._disposables.push(n._navigationBar,t.mapTypeButtonClicked.add(function(t){return n.mapTypeButtonClicked.invoke(t)}));n.navigationBarLoaded.invoke();n._container.instanceAsync("NavigationBarOverlay",function(t){n.getOverlays().insert(t)},{NavigationBar:t})},{Map:this,CoreConfig:this._coreConfig,DragonflyContainer:this._container})},a.prototype._createCopyrightControl=function(){var n=this,t;this._mapOptions.showCopyright&&(t=this._mapOptions&&this._mapOptions.showTermsLink?this._mapOptions.showTermsLink:!1,this._container.instanceAsync("CopyrightControl",function(t){n._copyrightControl=t;n._disposables.push(t);n._container.instanceAsync("CopyrightOverlay",function(t){n.getOverlays().insert(t);n.copyrightControlLoaded.invoke(n._copyrightControl)},{CopyrightControl:t})},{Map:this,CoreConfig:this._coreConfig,ShowTermsLink:t}))},a.prototype._createScaleBar=function(){var n=this;this._mapOptions.showScalebar&&this._container.instanceAsync("ScaleBar",function(t){n._scaleBarControl=t;n._disposables.push(n._scaleBarControl);n._container.instanceAsync("ScaleBarOverlay",function(t){n.getOverlays().insert(t)},{ScaleBar:t})},{Map:this})},a.prototype._onModeChanged=function(n,t){var e=this,i=null,u=n&&n.mapModeType,f=t&&t.mapModeType;u!==f&&(i={oldMode:u,newMode:f},this._disposables.indexOf(t)<0&&this._disposables.push(t));i&&this.mapModeChanged.invoke(i);n&&n.deactivated&&n.deactivated();r.logDebugData("Map - onModeChanged event");this._bootstrapState!==0&&(this._modeElement.fadeToChild(t.getRootElement()),this.modeDOMsMounted.invoke(t.mapModeType));t&&t.activated&&t.activated();this.copyrightChanged&&this.copyrightChanged.invoke();this._onPaintEventHandler&&(this._onPaintEventHandler.dispose(),this._onPaintEventHandler=null);t&&t.onPaint&&(this._onPaintEventHandler=t.onPaint.add(function(){return e._raiseViewChangingAfterPaintEvent()}));t.mapModeType===0&&this._bootstrapState===2&&this._postInitForCompositeMode();t.mapModeType===2?this._overlayElement&&this._overlayElement.set_style({transform:""}):this._overlayElement&&this._overlayElement.set_style({transform:"scale(1)"})},a.prototype._onActualSizeChanged=function(n,t){var i=this,r=t&&t.width,u=t&&t.height;r>0&&u>0&&Microsoft.Maps.setAsync(function(){if(i._targetView){i._mapOptions.maxBounds&&i.setMaxBounds(i._mapOptions.maxBounds,!1);var n=i._getConstrainViewArgs(i._targetView,1);i.setView(n.view);i.actualSizeChanged.invoke()}})},a.prototype._onDesiredSizeChanged=function(n,t){var u=t&&t.width,f=t&&t.height,r=this._parentElement,h,c,o,s,e;if(i.isMapsVertical||(r.length>0&&typeof Element=="function"&&r[0]instanceof Element?(h=parseFloat(r.get_style("width")),c=parseFloat(r.get_style("height")),h===0&&r.set_style({width:"100%"}),c===0&&r.set_style({height:"100%"})):(o=r[0]&&r.get_size()||new b(0,0),o.width===0&&r.set_style({width:"100%"}),o.height===0&&r.set_style({height:"100%"}))),s=u===-1||f===-1,e={position:s?"absolute":"relative",width:u===-1?"100%":u===-2?"100vw":u+"px",height:f===-1?"100%":f===-2?"100vh":f+"px"},s){switch(r.get_style("position")){case"relative":case"absolute":break;default:r.set_style({position:"relative"})}e.top=e.left=0}this._rootElement.set_style(e);this._sizeHelper.pollSize()},a.prototype._getConstrainViewArgs=function(n,t){var i=new su(n,t);return this.constrainView.invoke(i),i},a.prototype._enforceMinMaxAltitude=function(n){var t=this._mapOptions.navigationOptions;typeof t.minCameraAltitude=="number"&&(n.cameraLocation.altitude=Math.max(t.minCameraAltitude,n.cameraLocation.altitude));typeof t.maxCameraAltitude=="number"&&(n.cameraLocation.altitude=Math.min(t.maxCameraAltitude,n.cameraLocation.altitude))},a.prototype._onDisplayTileBoundariesChanged=function(){var n=this},a.prototype.getLogoEnd=function(){var t=0,n;return this._logoControl&&(n=this._logoControl.getRootElement(),n&&(t=n.get_relative_pos().x+n.get_size().width)),t},a.prototype._updateMapOptions=function(n,t){for(var i,r,o,e=Object.keys(t),u=0,l=e.length;u=1.5),n&&(i=this._coreConfig.allowHighDpi?t=2:2));this._tileDpiScale=t;this._labelDpiScale=1},a.prototype._beforeUnloadDummyHandler=function(){},a.prototype._AuthenticateMap=function(){var n=this,t=new pt(this._mapOptions&&this._mapOptions.credentials,!1,this);this._disposables.push(t.onAuthBasedFeatureEnabled.addOne(function(){n.setView(n.getView(),null,0,!0)}));t.authenticateClientAndRetrieveSessionId(null)},a.DEFAULT_ZOOM_CUT_OFF_FOR_AERIAL_MODE=21,a._nextMapId=1,a._animationInterval=15,a._animationFrameWorkDispatcherKey="animationFrame",a._viewChangeMaxPercent=1.5,a}(dt),wt;(function(n){n[n.hidden=0]="hidden";n[n.visible=1]="visible"})(wt||(wt={})),function(n){n[n["default"]=0]="default";n[n.compact=1]="compact";n[n.minified=2]="minified";n[n.square=3]="square"}(it||(it={})),function(n){n[n.vertical=0]="vertical";n[n.horizontal=1]="horizontal"}(ht||(ht={}));wr=function(){function n(){}return n.minimized=0,n.expanded=1,n.hidden=2,n}(),function(n){n[n.topLeft=0]="topLeft";n[n.TopLeft=0]="TopLeft";n[n.bottomLeft=1]="bottomLeft";n[n.BottomLeft=1]="BottomLeft";n[n.topRight=2]="topRight";n[n.TopRight=2]="TopRight";n[n.bottomRight=3]="bottomRight";n[n.BottomRight=3]="BottomRight";n[n.none=4]="none";n[n.None=4]="None"}(ci||(ci={}));var ef=function(){function n(n){this._multiplier=n}return n.prototype.hasValueAt=function(n){return this._multiplier.hasValueAt(n)},n.prototype.getHasValue=function(){return this._multiplier.getHasValue()},n.prototype.evaluate=function(n){return this._multiplier.evaluate(n)},n}(),sf=function(){function n(n,t,i,r){this._hue=n;this._saturation=t;this._luminance=i;this._alpha=r}return n.prototype.hasValueAt=function(n){return this.getHasValue()&&(this._hue.hasValueAt(n)||this._saturation.hasValueAt(n)||this._luminance.hasValueAt(n)||this._alpha.hasValueAt(n))},n.prototype.getHasValue=function(){return this._hue&&this._hue.getHasValue()||this._saturation&&this._saturation.getHasValue()||this._luminance&&this._luminance.getHasValue()||this._alpha&&this._alpha.getHasValue()},n.prototype.evaluate=function(n){return{x:this._hue?this._hue.evaluate(n)/360:0,y:this._saturation?this._saturation.evaluate(n):0,z:this._luminance?this._luminance.evaluate(n):0,w:this._alpha?this._alpha.evaluate(n):0}},n}(),r=function(){function t(){}return t.assertNotNull=function(n,i){t.assert(n===0||n||n===!1,i+" cannot be null")},t.assertNotNullOrEmpty=function(n,i){t.assertNotNull(n,i);t.assertIsString(n,i);t.assert(n.length>0,i+" cannot be an empty string")},t.assertInstanceOf=function(n,i,r){t.assertNotNull(i,"ctor");t.assert(n instanceof i,r+" must be an instance of "+t.getName(i))},t.assertIsString=function(n,i){t.assert(typeof n=="string",i+" must be a string")},t.assertIsFunction=function(n,i){t.assert(typeof n=="function",i+" must be a function")},t.assertIsInteger=function(n,i){t.assert(typeof n=="number"&&n%1==0,i+" must be an integer")},t.assert=function(){},t.logObject=function(n,i,r){var f,u,e;if(t.isDebugRun)try{console&&typeof console.log!="undefined"&&(u=i,u+=": %O",console.log.apply(console,[u,r]))}catch(o){}window.perfRun&&(f=t._getCurrentGroupinMainStack(),f&&(u=null,u=window.verbose?t._formatLogString(i):t._formatLogString(n),e=t._getLogKey(f),f[e+"__"+u]=r))},t.log=function(n){for(var r,i,e,o=[],u=2;u1?t[1]:"Unknown"},t.setTestHook=function(n,i,r){this._logElement=f._createElement("div").set_attr("id","testHook").appendTo(n);this._debugElement=f._createElement("div").set_attr("id","debugHook").appendTo(n);this._perfTestHookElement=f._createElement("div").set_attr("id","perfTestHook").appendTo(n);this.enableFunctionalTestHooks=!0;t._setMap(r);typeof FunctionalTestHooks!="undefined"&&FunctionalTestHooks.setTestHookSettings(u,i,f._getUrlParam,vi.fromString)},t._setMap=function(n){this.enableFunctionalTestHooks&&(!window.$map||window.$map.isDisposed?(t._map=window.$map=n,window.$map.frameManagerLoaded.addOne(function(){var n=window.$map.getFrameManager();n.primitivesRendered.addOne(function(){window.$mapLoaded=!0})})):n.getMapOptions().navigationOptions&&n.getMapOptions().navigationOptions.lockCameraAltitude&&(window.$overviewMap=n))},t.setLabelLogElement=function(n){this._labelLogElement=n},t.logPoiLayerStyleStart=function(){this.enableFunctionalTestHooks&&(this._poiLayerStyle=t._poiLayerStyleStart)},t.logPoiLayerStyleEnd=function(n){if(this.enableFunctionalTestHooks&&n){var i=this._poiLayerStyle;i!==t._poiLayerStyleStart&&(i+="}",this.logTestData(n,i));this._poiLayerStyle=""}},t.logVectorImageTemplate=function(n,t){function r(n){var t=n&&n.vectorType,i="";if(typeof t=="number"){var r=n.style||{},u=r.fillStyle||"nofill",f=r.strokeStyle||"nostroke";i="VR{Type: ".concat(t,", FillStyle: ").concat(u,", StrokeStyle: ").concat(f,"}")}return i}var i,u;this.enableFunctionalTestHooks&&this._poiLayerStyle&&(i=[],n&&(i=i.concat(n.map(r))),t&&(i=i.concat(t.map(r))),u="VT{".concat(i.join(""),"}"),this._poiLayerStyle+=u)},t.logLabelData=function(n){var u,r,f,i;if(n&&(this.enableFunctionalTestHooks||this._labelLogElement))for(u=Object.keys(n),r=0,f=u.length;r0)return n[t-1]}return null},t.TileLogTag="tile",t.VectorDataRenderLogTag="vectorDataRender",t.UserLogTag="user",t.NetworkLogTag="network",t.LoadOrderTag="loadOrder",t.LabelDrawOrderTag="LabelDrawOrder",t.PerfLogTag="perfLogs",t._poiLayerStyleStart="PLS{",t}(),li=function(){function n(n){this._capacity=n;this._count=0;this._dictionary={}}return n.prototype.addItem=function(n,t,i){if(t){var r=this._dictionary[n];r?a.areEqual(r.item,t)||(this._dictionary[n].item=t,this._moveNodeToHead(r)):this._addNewItem(n,t,i)}},n.prototype.convertToArray=function(){for(var t=[],n=this._headNode;n;)t.push(n.item),n=n.next;return t},n.prototype.getItem=function(n){var t,i=this._dictionary[n];return i?(t=i.item,this._moveNodeToHead(i)):t=null,t},n.prototype.clear=function(){while(this._count>0)this._deleteTailNode()},n.prototype.getCount=function(){return this._count},n.prototype.getInternalDictionary=function(){return this._dictionary},n.prototype.setCapacity=function(n){var i,t;if(n>0){if(this._capacity>n&&this._count>n)for(i=this._count-n,t=0;ti.MaxDispatchTime&&(n=!0))},i.prototype._sortByOrder=function(n,t){return n[i._orderAttributeKey]-t[i._orderAttributeKey]},i.prototype._ensureTimer=function(){var n=this;this._tickTimeoutId||(this._tickTimeoutId=i._requestAnimFrame(function(){try{n._tick()}catch(t){if(u.logger)u.logger.logCriticalError(t);else throw t;}}))},i.MaxDispatchTime=50,i._orderAttributeKey="$mm$dispatchOrder",i._dispatchKey="$mm$dispatchkey",i._requestAnimFrame=n.Effects.Animation.requestAnimationFrame,i}(),lf=function(n){function t(i,r,u){u===void 0&&(u=t._defaultCapacity);var f=n.call(this,i,r)||this;return f._capacity=u,f}return p(t,n),t.prototype.release=function(t){if(this._objectPool.length===this._capacity){var i=t;i.dispose&&i.dispose()}else n.prototype.release.call(this,t)},t._defaultCapacity=256,t}(ar),af=function(){function n(){this._dispatchedQueryWithPriority={}}return n.prototype.dispatch=function(n,t,i){var u,f;if(i===void 0&&(i=5),!this._disposed){for(r.assertIsFunction(n,"f"),u=this._dispatchedQueryWithPriority[i],u||(u=[],this._dispatchedQueryWithPriority[i]=u),f=u.length;f--;)if(u[f].action===n)return;u.push({action:n,dispatchGroupKey:t});this._ensureTimer()}},n.prototype.cancelDispatch=function(n,t){r.assertNotNull(n,"f:action cannot be empty");this._cancel(n,null,t)},n.prototype.cancelAllDispatch=function(){this._dispatchedQueryWithPriority={}},n.prototype.cancelDispatchWithKey=function(n,t){r.assertNotNullOrEmpty(n,"Key cannot be empty or null");this._cancel(null,n,t)},n.prototype.dispose=function(){this._disposed=!0;this._dispatchedQueryWithPriority={}},n.prototype._cancel=function(n,t,i){var r,u;if(typeof i!="undefined"&&i>=0)r=this._dispatchedQueryWithPriority[i],this._cancelActionInWorkCollection(r,n,t);else for(u=0;u<=5;u++)r=this._dispatchedQueryWithPriority[u],this._cancelActionInWorkCollection(r,n,t)},n.prototype._cancelActionInWorkCollection=function(n,t,i){for(var r=n&&n.length||0;r--;)n[r]&&(i?n[r].dispatchGroupKey===i&&n.splice(r,1):t&&n[r].action===t&&n.splice(r,1))},n.prototype._tick=function(){var i,u;this._tickTimeoutId=null;var r=0,f=Date.now(),t=null;for(i=0;i<=5;i++){for(t=this._dispatchedQueryWithPriority[i];r0;)u=t.shift(),u.action(),r=Date.now()-f;if(t&&t.length>0){this._ensureTimer();break}}},n.prototype._ensureTimer=function(){var n=this;this._tickTimeoutId||(this._tickTimeoutId=Microsoft.Maps.setTimeout(function(){n._tick()},0))},n._throttleElapseTime=5,n}(),vf=function(){function n(n,t,i,r,u){var f=this;this._workDispatcher=n;this._index=0;this._items=t;this._iterationCallback=i;this._completionCallback=r;this._priority=u;this._action=function(){f._iterate()}}return n.prototype._next=function(){return this._items[this._index++]},n.prototype.hasNext=function(){return this._index=0&&n2)throw new Error("More than one fragment is found in the input");if(i.length===2&&(r=i[0],u.fragment=decodeURIComponent(i[1])),i=r.split("?"),i.length>2)throw new Error("More than one query param identifier ('?') is found in the input");if(i.length===2)for(r=i[0],u.queryStringParameters={},h=i[1],i=h.split("&"),f=0;f0&&(c=decodeURIComponent(e.substring(0,o)),l=decodeURIComponent(e.substring(o+1)),u.queryStringParameters[c]=l);if(i=r.split("://"),i.length>2)throw new Error("More than one protocol identifier ('://') is found in the input");if(i.length===2&&(r=i[1],u.protocol=i[0]),i=r.split("/"),i.length>1&&(r=i[0],u.path=i.slice(1).join("/")),r.indexOf("@")>=0)throw new Error("Unsupported url");if(i=r.split(":"),i.length>2)throw new Error("More than one port identifier (':') is found in the input");if(u.host=i[0],i.length===2){if(s=parseInt(i[1]),isNaN(s))throw new Error("port number should be an integer");u.port=s}return u},n.prototype.protocolAndDomain=function(){return(this.protocol+"://"+this.host+(typeof this.port=="undefined"?"":":"+this.port)).toLowerCase()},n}();function bt(){}yi=function(){function n(n){var t=this;this._state=0;this._continuations=[];try{n(function(n){t._resolve(n)},function(n){t._reject(n)})}catch(i){this._reject(i)}}return n.prototype.then=function(t,i){typeof t!="function"&&(t=null);typeof i!="function"&&(i=null);var r=new n(bt);return this._addContinuation({child:r,fulfill:t,reject:i}),r},n.resolve=function(t){if(t instanceof n)return t;var i=new n(bt);return i._resolve(t),i},n.reject=function(t){var i=new n(bt);return i._reject(t),i},n.all=function(t){var u=t.length,r=[],i=new n(bt);return t.length?t.forEach(function(t,f){n.resolve(t).then(function(n){r[f]=n;--u==0&&i._fulfill(r)},function(t){n._isSettled(i._state)||i._reject(t)})}):i._fulfill(r),i},n.race=function(t){var r=t.length,i=new n(bt);return t.length?t.forEach(function(t){n.resolve(t).then(function(t){n._isSettled(i._state)||i._fulfill(t)},function(t){n._isSettled(i._state)||i._reject(t)})}):i._fulfill(null),i},n._dispatchQueue=function(){var i=n._asyncQueue,t,r;for(n._asyncQueue=[],n._asyncTimerId=0,t=0,r=i.length;t0&&(a=a+" "+f(c,"ms"));i[e]=!0;n.push(a)}}function f(n,t){return(typeof n!="string"||n.match(/^[\-\.0-9]+$/))&&(n=""+n+t),n}function v(t,i){n(t).set_style(i)}function y(t,i,r){for(var h,c,w,b,l=[],e=0,o=0,k=i.length;o=0;i--)r=this._stylesheets[i],r&&this._initiate(r);this._initStyleString();this.customMapStyleVersion++;this.changed.invoke()},n.prototype.settingHasValue=function(t,i){return this._customSettings&&this._customSettings[n._pascalCase(t)]===i},n.prototype.getElementStyle=function(n,t){var r,i=this.getElementItem(n,t);if(i)switch(i.type){case 3:r=i.value;break;case 2:r=i.value;break;case 1:r=et.convertPackedTorgba(i.value)}return r},n.prototype.getElementItem=function(t,i){var r,u,o,f,e;if(this.hasCustomStyle&&t&&i)for(u={},o=t.indexOf(".")>=0;t&&!u[t];){if(f=this._elementStyles[t],r=f&&f[i],u[t]=!0,r)break;if(o){if(e=this._extensionHierarchy[t]||"",e.indexOf(".")===-1)return undefined;t=e}else t=n._elementHierarchy[t]}return r},n.prototype.getElementBucket=function(t,i){for(var r;t&&this.styleEntryBucketMap;){if(r=this.styleEntryBucketMap.getEntryBucket(t,i),r)break;t=t.indexOf(".")>=0?this._extensionHierarchy[t]:n._elementHierarchy[t]}return r},n.prototype._initiate=function(n){n=n||{};n.elements=n.elements||{};n.settings=n.settings||{};n.extensions=n.extensions||{};this._parseCustomMapStyle(n)},n.prototype._initStyleString=function(){for(var i,r,u,n="",e=Object.keys(this._elementStyles),t=0,f=e;t=0?i:n._pascalCase(i),this._extensionHierarchy[f]=v))}},n.prototype._parseProperties=function(t,i,r){var a,o,h,s,u,l;if(r===void 0&&(r={}),t)for(a=Object.keys(t),o=0,h=a;o-1})},p=function(n){return n.some(function(n){return new RegExp(n).test(navigator.userAgent)})},w=function(){return!u||i(c,!0)||i(l,!1,!0)||i(a,!1,!1)},b=function(){return u&&(i(v,!1,!0)||i(y,!1,!1))};w()||p(["\\bSilk\\b"])?r=2:b()&&(r=0)}catch(k){r=2}return{classification:r,webgl2Supported:f}}function e(){var n={},o=window.navigator,l,s,h,c,e;o&&o.hardwareConcurrency>0&&(n.cpuCores=o.hardwareConcurrency);try{s=ct.getItem(t);s&&(h=JSON.parse(s),n.webgl2Supported=h.webgl2Supported,l=n.deviceClassification=h.deviceClassification)}catch(a){}return typeof l=="undefined"&&(c=f(),e=c.classification,e===1&&(n.cpuCores>=i?e=0:n.cpuCoresn._minimumGeneralizationCoordinates&&i&&i<=n._maximumGeneralizationZoom,f,o,e,u;if(s&&(o=n._getGeneralizationBucketKey(i),f=this._initializeGeneralization(t,o,i,r),f.length===0&&r))for(f.push(0),r.calculateProjectedCoordinates(0,t,0),this._lastRenderableX=r.lastProjectedX,this._lastRenderableY=r.lastProjectedY,e=t.x.length,this._hasNextProjectedCoordinates=!1,u=1;uthis._lastRenderableX&&c>this._nextProjectedX||lthis._lastRenderableY&&l>this._nextProjectedY);f&&(y=Math.sqrt(a),this._totalPerpendicularDistance+=Math.abs(s*o-h*e)/y,f=this._totalPerpendicularDistancet)throw new Error("Please provide the correct latitude in the range of [-90, 90].");i=e.normalizeLongitude(i);var h=Math.pow(r,f)-1,c=o(-t,t,h,n),l=o(-u,u,h,i),a=s(c),v=s(l);return a+v}function o(n,t,i,r){var u=(r-n)/(t-n),f=u*i;return Math.round(f)}function s(n){for(var t="",u=n,o,e;u>0;)o=Math.floor(u%r),u=Math.floor(u/r),t=i[o]+t;for(e=Math.floor(f-t.length);e>0;)t=i[0]+t,e=e-1;return t}var t=90,u=180,i="0123456789bcdfghjkmnpqrstvwxyz",r=i.length,f=6;n.latLonEncoder=h}(wi||(wi={}));var s=function(){function n(){this.collinsBart="cb"}return n.getTilePrimerId=function(n){return"tp"+n},n.isValid=function(t){switch(t){case n.aerial:case n.birdseye:case n.road:case n.streetside:case n.ordnanceSurvey:case n.mercator:case n.grayscale:case n.canvasDark:case n.canvasLight:case n.highContrast:case n.birdseyeV2:case n.roadDark:return!0}return!1},n.aerial="a",n.birdseye="be",n.none="",n.ordnanceSurvey="os",n.road="r",n.streetside="x",n.mercator="m",n.grayscale="cg",n.canvasDark="wd",n.canvasLight="wl",n.highContrast="hc",n.roadDark="d",n.birdseyeV2="be2",n}(),kf=function(){function n(t,i,r,e){var a,v,o,s,h,p;if(r===void 0&&(r=2e3),e===void 0&&(e=1200),this.duration=0,this.zoomDelta=0,a=parseInt(f._getUrlParam(window.location,"maxDuration")),e=a?a:e,this._maxAnimationDuration=e,v=parseInt(f._getUrlParam(window.location,"velocity")),r=v?v:r,o=u.Internal.TileSystemHelper,o){s=l.fromLocation(i.cameraLocation,!0);h=l.fromLocation(t.cameraLocation,!0);this.zoomDelta=s-h;var y=Math.min(s,h),w=o.latLongToPixelXY(i.cameraLocation,y),b=o.latLongToPixelXY(t.cameraLocation,y),c=Math.sqrt(Math.pow(w.x-b.x,2)+Math.pow(w.y-b.y,2))+Math.abs(s-h)*n._pixelDistancePerZoom+Math.abs(i.heading-t.heading)*n._pixelDistanceFactorPerHeadingDegree,k=o.getMapSize(y);c>k/2&&(c=Math.max(0,k-c));p=c/r*1e3;this.duration=p>e?0:p;this.duration>0&&this.duration180&&(u0)r=1-Math.pow(1-r,2);else if(this.duration>n._minDurationForZoomEffectDuringPan&&u)return Math.sin(r*Math.PI)*t*n._zoomAnimationFactorDuringLongPan*(1+Math.log(this.duration/n._minDurationForZoomEffectDuringPan))+t;return(i-t)*r+t},n._pixelDistancePerZoom=500,n._pixelDistanceFactorPerHeadingDegree=4,n._slowAnimationThresholdDuration=225,n._minDurationForZoomEffectDuringPan=500,n._zoomAnimationFactorDuringLongPan=.4,n._durationMultiplierDuringShortPan=10,n}(),bi=function(n){function t(t,i,r,u,f){var e=n.call(this)||this;return e.crs=st.instance,e.geometryType=1,e.setLocation(t),e.entity=i,e.anchor=u,e.image=r,e.imageSize=f,e}return p(t,n),t.getLocation=function(n,t){var i,r,u;return n&&t&&(r=n.toLatitude(t.x,t.y),u=n.toLongitude(t.x,t.y),i=new e(r,u)),i},t.prototype.getLocation=function(){return t.getLocation(this.crs,this.geometry)},t.prototype.isTapEnabled=function(){return!0},t.prototype.setLocation=function(n){this.geometry={x:n.longitude,y:n.latitude,bounds:[n.latitude,n.longitude,n.latitude,n.longitude]}},t.prototype.dispose=function(){this.isDisposed||(f._nullifyClass(this),this.isDisposed=!0)},t}(ii),df=function(n){function t(t,i,r,u){return n.call(this,t,i,r,u)||this}return p(t,n),t.prototype.isHoverEnabled=function(){return!0},t.prototype.isMoveEnabled=function(){return!0},t}(bi),kr=function(n){function t(t,i,r,u){var f=n.call(this)||this;return f.defineProperty("overlayElement"),f.defineProperty("alignment"),f.defineProperty("anchor"),f.defineProperty("primitive"),f.setOverlayElement(t),f.setAlignment(i),f.setAnchor(r),u&&f.setPrimitive(u),f}return p(t,n),t}(dt),ki=function(){function n(){}return n.showOverlay=function(t,i,r){if(!n._primitive){var u=i.overlayTemplate;r.getOverlayTemplate&&(u=r.getOverlayTemplate());n._createOverlay(t,u,r,i)}},n.hideOverlay=function(t,i){if(n._overlay&&n._primitive&&n._primitive===i&&(!i||i===n._overlay.getPrimitive())){var r=t.getOverlays();r&&r.indexOf(n._overlay)!==-1&&(r.remove(n._overlay),n._overlay=null,n._primitive=null)}},n.getOverlay=function(){return n._overlay},n._createOverlay=function(t,i,r,u){if(i&&r.geometryType===1){var o=i.applyDataTemplate({primitive:r}),f=r.geometry,s=typeof u.overlayAlignment=="number"?u.overlayAlignment:new e(r.crs.toLatitude(f.x,f.y),r.crs.toLongitude(f.x,f.y));n._overlay=new kr(o,s,u.overlayAnchor,r);n._primitive=r;t.getOverlays().insert(n._overlay)}},n}(),ui=function(){function n(t){var r=this,u;this._disposables=[];this._dwellTimeMarkerIds=[];this._initializationTime=Date.now();n._firstInitializationTime||(n._firstInitializationTime=this._initializationTime);this._map=t;this._totalTicks=0;this._framesetStartTime=-1;this._updateControlStartTime();this._onMapControlInitialized();i.isMapsVertical&&this._logDwellTimeMarker();this._disposables.push(this._map.frameManagerLoaded.addOne(function(){return r._onMapFrameManagerLoaded()}));this._disposables.push(this._map.mapZoomStarted.add(function(){return r._onMapZoomStarted()}));this._disposables.push(this._map.mapZoomStopped.add(function(){return r._onMapZoomStopped()}));this._disposables.push(this._map.mapPanStarted.add(function(){return r._onMapPanStarted()}));this._disposables.push(this._map.mapPanStopped.add(function(){return r._onMapPanStopped()}));u=function(){r._totalTicks++};this._disposables.push(this._map.viewChanging.add(u));this._disposables.push(this._map.navigationBarLoaded.addOne(function(){return r._onNavigationBarLoaded()}));typeof performance!="undefined"&&performance.setResourceTimingBufferSize&&performance.setResourceTimingBufferSize(250)}return n.prototype._onMapFrameManagerLoaded=function(){var n=this,t=this._map.getFrameManager(),i=function(){n._currentFrameDataLoadTime+=Date.now()-n._lastFramesetStartTime},r=function(){n._currentFrameLabelsRenderedTime=Date.now()-n._framesetStartTime},u=function(){n._currentFramePrimitivesRenderedTime=Date.now()-n._framesetStartTime};this._disposables.push(t.frameFailed.add(function(t){return n._onFrameFailed(t)}));this._disposables.push(t.frameSet.add(function(t){return n._onFrameManagerFrameSet(t)}));this._disposables.push(t.frameRendered.add(function(){return n._onFrameRendered()}));this._disposables.push(t.primitivesRendered.add(u));this._disposables.push(t.labelsRendered.add(r));this._disposables.push(t.dataLoaded.add(i))},n.prototype._onMapControlInitialized=function(){n._logStatus.Maps_BST&&i.isMapsVertical||(n.mark("Maps_BST",i.isMapsVertical?null:this._getControlTimeTillNow()),n._logStatus.Maps_BST=!0)},n.prototype._logPPLT=function(){if(i.isMapsVertical){var t=window.Maps_PPLT;delete window.Maps_PPLT;t&&!n._logStatus.Maps_PPLT&&(n.record("Maps_PPLT",Math.round(t)),n._logStatus.Maps_PPLT=!0)}},n.prototype._logDiagnosticsInfo=function(){var t=pi.detectCapability(),i=t.cpuCores;typeof i=="number"&&n.record("Maps_CPUCORE",i);n.record("Maps_GPU",t.deviceClassification);n.record("Maps_DPR",window.devicePixelRatio||1);n.record("Maps_SlowP",(u===null||u===void 0?void 0:u.Internal._CoreConfig().isSlowPartner)?1:0)},n.prototype._getControlTimeTillNow=function(){return Math.round(o._PerfV2BSCTime-o._PerfV2STime+(n._firstInitializationTime-o._PerfV2ISTime)+(Date.now()-this._initializationTime))},n.prototype._onNavigationBarLoaded=function(){this._navigationBarLoaded=!0;this._tryLogPLT();n._tryLogPLTex()},n.prototype._tryLogPLT=function(){if((!n._logStatus.Maps_PLT||!i.isMapsVertical)&&!n._isPLTLogged&&this._navigationBarLoaded&&this._frameRendered){n._isPLTLogged=!0;n._logStatus.Maps_PLT=!0;n.mark("Maps_PLT");var t=0;i.enableAdditionalPerfLogging&&i.isMapsVertical&&(t=performance?performance.now():0);i.isMapsVertical||n.record("Maps_CLT",this._getControlTimeTillNow());this._logResourceData();i.enableAdditionalPerfLogging&&i.isMapsVertical&&this._logPerfStats(t);n.tryFlush()}},n.prototype._logPerfStats=function(t){var o,e,s;if(performance&&performance.getEntriesByType){var b=/bing.com\/(\w|\/|,|-|\.)+\.(css|js)/ig,k=/.com\/th\?/ig,r=performance.getEntriesByType("navigation")[0],c=performance.getEntriesByType("resource"),f="";if(t&&(f+="a_v8_".concat(Math.round(t),"_").concat(window.innerWidth,"_").concat(window.innerHeight,"||")),r){var l=Math.round(r.requestStart-r.startTime),a=Math.round(r.responseStart-r.requestStart),v=Math.round(r.responseEnd-r.responseStart),y=Math.round(r.duration),p="encodedBodySize"in r?r.encodedBodySize:-1,w="transferSize"in r?r.transferSize:-1;f+="n_".concat(r.type,"_").concat(l,"_").concat(a,"_").concat(v,"_").concat(y,"_").concat(p,"_").concat(w,"||")}if(c.length>0){for(o=[],e=0,s=c;e-1?u="t":h.indexOf("/stl?")>-1&&(u="x");var g=Math.round(i.startTime),l=Math.round(i.requestStart-i.startTime),a=Math.round(i.responseStart-i.requestStart),v=Math.round(i.responseEnd-i.responseStart),y=Math.round(i.duration),p="encodedBodySize"in i?i.encodedBodySize:-1,w="transferSize"in i?i.transferSize:-1;o.push("".concat(u,"_").concat(g,"_").concat(l,"_").concat(a,"_").concat(v,"_").concat(y,"_").concat(p,"_").concat(w))}f+=o.join("|")}n.record("Maps_perfData",f)}},n.prototype._logResourceData=function(){var ft=this,w;if(!n._logStatus.resourceData&&typeof performance!="undefined"){if(n._logStatus.resourceData=!0,performance.getEntriesByType){var g=performance.getEntriesByType("resource"),nt=0,tt=0,i=0,r=0,u=0,f=0,e=0,o=0,s=0,h=0,c=0,l=0,a=0,v=0,y=0,p=0;for(w=0;w0?t.connectEnd-t.secureConnectionStart:0),k=Math.floor(t.responseStart-t.requestStart),d=t.responseStart>0?Math.floor(t.responseEnd-t.responseStart):0;b.indexOf("tiles.")>-1?(s=Math.max(it,s),h=Math.max(rt,h),c=Math.max(ut,c),l=Math.max(k,l),v=Math.max(d,v)):n.rmsUrlIdentifier.test(b)?(u=Math.max(it,u),f=Math.max(rt,f),e=Math.max(ut,e),o=Math.max(k,o),p=Math.max(d,p),t.encodedBodySize&&(i++,tt+=t.encodedBodySize),t.transferSize&&t.transferSize>0&&(r++,nt+=t.transferSize)):b.indexOf("/stl?")>-1&&(a=Math.max(k,a),y=Math.max(d,y))}i>0&&(n.record("Maps_CM",Math.round(r/i*100)),n.record("Maps_ERS",tt),n.record("Maps_TRS",nt),r===0&&n.mark("Maps_PLT2"),r===i&&n.mark("Maps_PLT1"));u&&n.record("Maps_BDNST",u);f&&n.record("Maps_BCT",f);e&&n.record("Maps_BSSLT",e);o&&n.record("Maps_BTTFB",o);p&&n.record("Maps_BDT",p);s&&n.record("Maps_TSDNST",s);h&&n.record("Maps_TSCT",h);c&&n.record("Maps_TSSSLT",c);l&&n.record("Maps_TSTTFB",l);a&&n.record("Maps_XSRTTFB",a);y&&n.record("Maps_XSRDT",y);v&&n.record("Maps_TSDT",v)}this._logMemory("Maps_MEM");this._timerId=Microsoft.Maps.setTimeout(function(){ft._logMemory("Maps_LMEM")},126e4)}},n.prototype._updateControlStartTime=function(){var r,u,t,n,f;if(!i.isMapsVertical&&typeof performance!="undefined"&&performance.getEntriesByType&&performance.timing)for(r=performance.getEntriesByType("resource"),u=/\/maps\/(sdk\/|sdkrelease\/)?mapcontrol(\?|$)/ig,t=0;t0&&(o._PerfV2STime=performance.timing.navigationStart+n.fetchStart);break}},n.prototype._logMemory=function(t){if(typeof performance!="undefined"){var i=performance.memory;i&&i.usedJSHeapSize&&n.record(t,Math.round(i.usedJSHeapSize/1e3))}},n.prototype._onMapPanStarted=function(){this._panStartTime=Date.now();this._totalTicks=0;this._isPanning=!0},n.prototype._onMapPanStopped=function(){if(this._totalTicks>0){var t=(Date.now()-this._panStartTime)/1e3;n.record("Maps_PFPS",Math.round(this._totalTicks/t))}},n.prototype._onMapZoomStarted=function(){this._zoomStartTime=Date.now();this._totalTicks=0;this._isZooming=!0},n.prototype._onMapZoomStopped=function(){if(this._totalTicks>0){var t=Math.round(this._totalTicks/((Date.now()-this._zoomStartTime)/1e3));n.record("Maps_ZFPS",t)}},n.prototype._onFrameFailed=function(t){t.reason!==1&&(this._framesetStartTime=-1,this._frameRendered||(this._frameRendered=!0,this._tryLogPLT()));n.record("Maps_FFAIL",t.reason)},n.prototype._onFrameManagerFrameSet=function(n){this._lastFramesetStartTime=Date.now();(this._framesetStartTime===-1||n.frame.cause===1)&&(this._currentFrameDataLoadTime=0,this._framesetStartTime=Date.now())},n._tryLogPLTex=function(){var o,s,t,r,l,u,h,a,e,c,f;if((!n._logStatus.Maps_PLTEX||!i.isMapsVertical)&&!n._isPLTexLogged&&n._isPLTLogged){for(o=!1,s=Object.keys(n._logStartKey),t=0;ti?u._dwellTimeMarkerIds.push(Microsoft.Maps.setTimeout(r,t-i)):r()},t=1;t<=3;t++)r=1e4*t,f(r)},n.prototype.dispose=function(){var t,i,r;for(n.tryFlush(),ut.dispose(),f._clearDisposables(this._disposables),clearTimeout(this._timerId),clearTimeout(n._keyExpiredTimerId),n._keyExpiredTimerId=-1,t=0,i=this._dwellTimeMarkerIds;t0){var r=Math.round(Date.now()-i);n.record(t,r)}n._tryLogPLTex()},n.logAfterRenderComplete=function(t,i,r){var u=n._logStartKey[t];u?(i&&(u.startTime=i),r&&(u.includeinPLT=r)):n.setStartTime(t,i,r);n._logStartKey[t].logOnRenderComplete=!0;n._startWatchForActiveKeys()},n.getLogKeyFromUrl=function(n){var t=null;return n&&(n=vi.fromString(n).path.toLowerCase(),n.indexOf("localoverlaybfpr")>-1?t="Maps_lobfpr":n.indexOf("localpoioverlaybfpr")>-1?t="Maps_lpobfpr":n.indexOf("overlaybfpr")>-1?t="Maps_obfpr":n.indexOf("landmarkdeals")>-1&&(t="Maps_lmd")),t},n._logPASMetrics=function(t,i){if(n._PASLoggingKeys.indexOf(t)>-1){var r=i||performance.now();n._pasPageTimingsLog[t]=Math.round(r)}},n._startWatchForActiveKeys=function(){n._keyExpiredTimerId===-1&&(n._keyExpiredTimerId=Microsoft.Maps.setTimeout(function(){var r,i,t;for(n._keyExpiredTimerId=-1,r=Date.now(),i=Object.keys(n._logStartKey),t=0;t2e4&&delete n._logStartKey[i[t]];Object.keys(n._logStartKey).length>0&&n._startWatchForActiveKeys()},1e4))},n._logStatus={},n._logStartKey={},n._keyExpiredTimerId=-1,n._PASLoggingKeys=["Maps_BST","Maps_PLT","Maps_PLTEX","Maps_CLT","Maps_SOPLT"],n._pasPageTimingsLog=window._pageTimings||(window._pageTimings={}),n.rmsUrlIdentifier=/bing.com\/(\w|\/|,)+\.(css|js)/ig,n}(),ut;(function(n){function c(){h&&u===-1&&(u=Microsoft.Maps.setTimeout(s,l))}function a(n,t){if(i.enableInstrumentation||e&&e[n.toLowerCase()]){if(n==="Maps_CLT"){var u=f._getCoreConfig().mapcontrolVersion==="experimental";n=i.isMapsAnswer?"Maps_CLTserp":i.isMsftPartner?u?"Maps_CLTme":"Maps_CLTmr":u?"Maps_CLTse":"Maps_CLTsr"}r.push(n+":"+(typeof t=="number"?Math.round(t):t));c()}}function v(n,r){if(i.enableInstrumentation||e&&e[n.toLowerCase()]){if(!r){var u=window.performance;r=Date.now()-(u&&u.timing?u.timing.navigationStart:o._PerfV2STime)}t.push(n+":"+Math.round(r).toString(36));c()}}function s(){n.igUpdatedPromise.then(function(){if(t.length>0||r.length>0){var n=Date.now(),e="id:".concat(Math.round(Math.random()*1e4),",")+(t.length>0?'P:"'.concat(t.join(","),'",'):"")+(r.length>0?'S:"'.concat(r.join(","),'",'):"")+'v: 1.1, T: "CI.Perf", FID: "CI", Name: "PerfV2"',f=i.dynamicProperties,o=f.impressionGuid,s=f.origin+"/fd/ls/lsp.aspx",c="Event.ClientInst<\/T>".concat(o,"<\/IG>").concat(n,"<\/TS><\/D><\/E>"),l="".concat(c,"<\/Events>").concat(n,"<\/STS><\/ClientInstRequest>");nt.doPost(s,l,{headers:{"Content-Type":"text/plain;charset=UTF-8"}});t=[];r=[];h=!0;clearTimeout(u);u=-1}})}function y(){s();clearTimeout(u)}var l=1e3,t=[],r=[],u=-1,h=!1,e=i.perfSDKInclusions;n.igUpdatedPromise=new rt;n.record=a;n.mark=v;n.tryFlush=s;n.dispose=y})(ut||(ut={}));var dr=function(n){function t(t,i,r,u){var f=n.call(this)||this;return f.crs=st.instance,f.geometryType=3,f.setArea(t,u),f.entity=i,f._template=r,f}return p(t,n),t.prototype.isTapEnabled=function(){return!0},t.getRings=function(n,t){var f,u,s,r,o,i,h,c,l;if(!n||!t||t.rings.length<1)return null;for(f=[],u=0,s=t.rings.length;u1&&n[0]===n[n.length-1];for(i=0,s=n.length;i180?(u-=360,t-=360):f<-180&&(u+=360,t+=360),t!==n[i]&&(n[i]=t,r=!0),o=t;return r&&h&&(n[n.length-1]=n[0]),r},t}(ii),gf=function(){function n(n,t){this._weight=1;this.location=n;this.setWeight(t)}return n.prototype.getWeight=function(){return this._weight},n.prototype.setWeight=function(n){typeof n=="number"&&isFinite(n)&&(this._weight=n<0?0:n)},n}(),o=u.Internal=u.Internal||{};o._BoundsAccumulator=ri;o._CurveKey=lt;o._Curve=at;o._Color=ft;o._CurveVector4=gi;o._CurveColor=iu;o._CurveColorHelper=et;o.CustomMapStyleManager=bf;o._DiscreteRangeCollectionSpline=uu;o._ElementSizeHelper=ir;o._ExternalPromise=rt;o._EntryPoints=yu;o._FeatureNames=pu;o._Helper=f;o._InstrumentationBase=InstrumentationBase;o.Iterator=vf;o._LayerFrameManager=er;o._LocalStorageCache=kt.LocalStorageCache;o._LoggingWrapper=fu;o._MapFrameData=or;o._ObjectWithId=ii;o._Overlay=kr;o._ObservableObject=dt;o._ObservableCollection=tt;o._Observable=a;o._ObservableObjectChangedArgs=vt;o._JSEvent=t;o._Binding=hr;o._EventBinding=ku;o._NAARectangle=tr;o._VectorMath=c;o._Dispatcher=cf;o._WorkDispatcher=af;o._Network=nt;o._Gimme=n;o._Debug=r;o._LatLonCrs=st;o._LatLonEncoder=wi;o._LruCache=li;o._TransformCurve=ef;o._HslaTransformCurve=sf;o._Url=vi;o.LocateMeEventArgs=rf;o.MapFrameManager=ti;o.MapHelper=uf;o.OrderedDictionary=yf;o.DelayLoadedObject=ei;o.StaticPromise=wf;o._GeometryGeneralizer=br;o._MapAuthentication=pt;o.ViewChangeArgs=yt;o._PerfV2Logger=ui;u=window.$MicrosoftMaps8;u.Anchor=hf;u.BasicMapAnimation=eu;u.ClientPerf=vu;u.ImageryMapLayer=ot;u.LatLonCrs=st;u.Location=e;u.LocationRect=w;u.LabelVisibility=wt;u.NetworkCallbacks=nt.callbacks;u.Matrix2D=nr;u.CoreMap=ff;u.MapLayer=fi;u.MapMath=k;u.MapTypeId=s;u.MapQuadrant=ci;u.NavigationBarMode=it;u.NavigationBarOrientation=ht;u.OverviewMapMode=wr;u.MapView=y;u.MapViewAnimator=kf;u.MoveableSimplePointPrimitive=df;u.Point=h;u.PooledImage=vr;u.PrimitiveOverlayHelper=ki;u.Rectangle=gt;u.SimplePointPrimitive=bi;u.SimpleLinePrimitive=di;u.SimpleAreaPrimitive=dr;u.Size=b;u.ResourceManager=ai;u.VectorMapLayer=cr;u.WeightedLocation=gf;u.ZoomLevel=l;u.ZoomAroundLocationAnimator=pr}catch(gr){if(u.logger)u.logger.logCriticalError(gr);else throw gr;}}).call(window)